dictionaries and 'in' in 2.1

Gustavo Niemeyer niemeyer at conectiva.com
Sat Nov 3 23:32:09 CET 2001


> The Python 2.1.1 manual, section 2.1.6, says:
> 
>   k in a        1 if a has a key k, else 0
> k not in a      0 if a has a key k, else 1

I've read this would be a new feature in 2.2. Are you sure
you were reading 2.1.1's manual?

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20011103/31a62fba/attachment.pgp>


More information about the Python-list mailing list