Author twouters
Recipients
Date 2007-07-11.10:49:17
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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).
History
Date User Action Args
2007-08-23 15:58:59adminlinkissue1751800 messages
2007-08-23 15:58:59admincreate