If you want an expression which returns True
you can try this:
print(Person.sayHello is Person.sayHello)
Just to add to the confusion, execute:
>>> say = Person.sayHello
>>> say()
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
say()
TypeError: sayHello() missing 1 required positional argument: 'self'
and even:
>>> say(say)
'Hello'
>>> say(None)
'Hello'
>>>
This is because:
>>> say
<function Person.sayHello at 0x02AF04B0>
say
refers to Person.sayHello
which is a function, which can be called, but which needs a parameter, but in this particular case the parameter is irrelevant.
Now, if you don't want to keep supplying the useless parameter, you can have one automatically bound:
>>> p=Person()
>>> p.sayHello()
'Hello'