[Python-Dev] Sets: elt in dict, lst.include - really begs for a PEP

Guido van Rossum guido@digicool.com
Mon, 29 Jan 2001 19:22:58 -0500


> After reading through this thread and noticing (but not paying close
> attention to) all the related posts on c.l.py (subject: "in for dicts"), it
> seems to me that the whole "if/for something in dict" thing needds to be
> hashed out in a PEP.  There were a fair amount of "Python's changing too
> fast" rants when 2.0 was released.  Adding a major feature such as this at
> the 2.1 stage is only going to generate that many more rants.  The fact that
> it was easy for Thomas to implement "if key in dict" doesn't make the
> overall concept less controversial.  There are apparently lots of varying
> opinions about what's reasonable.  This topic seems related to PEP 212 (Loop
> Counter Iteration) and PEP 218 (Adding a Built-In Set Object Type), but may
> well warrant its own.

Excellent.  Good reminder also that this shouldn't go into 2.1 --
clearly the design space is too complicated for a quick decision.

> That said, I have plenty enough on my plate trying to keep Mojam afloat
> these days, so I can't step into the crevass, just observe that it looks to
> me like a very long ways to the bottom... ;-)

I'm not able to lead such a PEP effort myself either, but I hope
*someone* will be.  This PEP has a good chance for 2.2 though (what
with BDFL approval and all :-).

--Guido van Rossum (home page: http://www.python.org/~guido/)