Is nan in (nan,) correct?
Ethan Furman
ethan at stoneleaf.us
Thu Mar 5 22:18:08 EST 2015
On 03/05/2015 06:55 PM, Ben Finney wrote:
> class NullType(object):
> """ A type whose value never equals any other.
>
> This type's values will behave correctly when tested for
> membership in a collection::
>
> >>> foo = NullType()
> >>> bar = NullType()
> >>> foo is foo
> True
> >>> foo is bar
> False
> >>> foo == foo
> False
> >>> foo == bar
> False
> >>> quux = [foo, "spam"]
> >>> "spam" in quux
> True
> >>> foo in quux
> True
Did you mean False here? Because True is current behavior.
--
~Ethan~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20150305/1b25717f/attachment.sig>
More information about the Python-list
mailing list