Patches item #1751800, was opened at 2007-07-11 12:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1751800&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 3000
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas Wouters (twouters)
Assigned to: Guido van Rossum (gvanrossum)
Summary: Dict comprehensions

Initial Comment:
Dict comprehensions, implemented somewhat like:

d = {}
for key, value in gen():
  d[key] = value

A version that passes the generator directly to dict() might be faster 
(although it would have to generate tuples instead of two separate items on the 
stack, which may negate the benefit of doing the actual dict assignment in C) 
-- and of course the danger of passing the generator to a local or global 
'dict' variable instead of the builtin 'dict'.

Includes tests, but not compiler-package or documentation changes (yet).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1751800&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to