Counterintuitive Python behavior
Philip Swartzleonard
starx at pacbell.net
Wed Apr 17 14:18:45 EDT 2002
Greg Weeks || Wed 17 Apr 2002 09:15:58a:
> There should have been an operator in Python that says when objects
> are conceptually the same. For the moment, call it "eq". The
> following would hold:
>
> 3 eq 3
> not (3 eq 4)
> a eq a # PROVIDED a HAS A VALUE
> [etc, etc]
Well, if a is defined, a has a value. So this is either true or a
NameError (?). Or do you mean if a is None, a eq a should be false?
--
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com
More information about the Python-list
mailing list