Help with sets

Gregory Ewing greg.ewing at canterbury.ac.nz
Mon Oct 11 20:11:18 EDT 2010


Robert Kern wrote:

> The reasoning for this decision is spelled out in the PEP introducing 
> the iterator feature:
> 
>   http://www.python.org/dev/peps/pep-0234/

There's also the question of whether 'if x in dict' should
compare keys only or both keys and values. This was also
hotly debated back when dicts were given an 'in' operator
(before that you had to use dict.haskey(x)). Can't remember
all the arguments, but it was definitely thought about.

-- 
Greg



More information about the Python-list mailing list