Can global variable be passed into Python function?
torriem at gmail.com
Sat Mar 1 19:06:54 CET 2014
On 03/01/2014 10:29 AM, Marko Rauhamaa wrote:
> Michael Torrie <torriem at gmail.com>:
>> No, '==' works fine no matter what objects you assign to your state
> Well, it doesn't since
> >>> a = float("nan")
> >>> a is a
> >>> a == a
> More generally, it depends on how the __eq__ method has been implemented
> for the class. You might even (foolishly) define a class such that:
> >>> a == b
> >>> a != b
Yes, good point.
More information about the Python-list