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-February/012560.html below:

[Python-Dev] re: Sets BOF / for in dict

[Python-Dev] re: Sets BOF / for in dictThomas Wouters thomas@xs4all.net
Sun, 4 Feb 2001 16:10:28 +0100
On Sun, Feb 04, 2001 at 09:19:47AM -0500, Greg Wilson wrote:

> If the keys to the dictionary are (for example) 2-element tuples, then:
>     for (left, right):value in dict:
> would also be expected to work, 

There is no real technical reason for it not to work. From a grammer point
of view, 

  for left, right:value in dict:

would also work fine. (the grammar would be:

  'for' exprlist [':' exprlist] 'in' testlist:

and since there can't be a colon inside an exprlist, it's not ambiguous.)
The main problem is whether you *want* that to work :)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



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