A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-January/012307.html below:

[Python-Dev] Re: Sets: elt in dict, lst.include

[Python-Dev] Re: Sets: elt in dict, lst.includeGuido van Rossum guido@digicool.com
Mon, 29 Jan 2001 21:06:35 -0500
This is all PEP material now.  Tim, do you want to own the PEP?  It
seems just up your alley!

> Cool!  Can we resist adding
> 
>     if key:value in dict
> 
> for "parallelism"?  (I know I can ...)

That's easy to resist because, unlike ``for key:value in dict'', it's
not unambiguous: ``if key:value in dict'' is already legal syntax
currently, with 'key' as the condition and 'value in dict' as the (not
particularly useful) body of the if statement.

> > (And why didn't we think of this before?)
> 
> Best guess:  we were focused exclusively on sequences, and a colon just
> didn't suggest itself in that context.  Second-best guess:  having finally
> approved one of these gimmicks, you finally got desperate enough to make it
> work <wink>.

I'm certainly more comfortable with just ``for key in dict'' than with
the whole slow of extensions using colons.

But, again, that's for the PEP to fight over.

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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4