Update for dict comprehensions.

This commit is contained in:
Thomas Wouters 2007-07-11 12:35:47 +00:00
parent 435e557eb0
commit ae5c53dba6
1 changed files with 5 additions and 0 deletions

View File

@ -112,6 +112,8 @@ Core language
* The ``__nonzero__`` special method will be renamed to ``__bool__`` * The ``__nonzero__`` special method will be renamed to ``__bool__``
and have to return a bool. The typeobject slot will be called and have to return a bool. The typeobject slot will be called
``tp_bool`` [23]_ [done] ``tp_bool`` [23]_ [done]
* Dict comprehensions, as first proposed in [#pep274]_ [done]
{K(x): V(x) for x in S if P(x)} means dict((K(x), V(x)) for x in S if P(x)).
To be removed: To be removed:
@ -371,6 +373,9 @@ References
.. [#pep238] PEP 238 (Changing the Division Operator) .. [#pep238] PEP 238 (Changing the Division Operator)
http://www.python.org/dev/peps/pep-0238 http://www.python.org/dev/peps/pep-0238
.. [#pep274] PEP 274 (Dict Comprehensions)
http://www.python.org/dev/peps/pep-0274
.. [#pep289] PEP 289 ("Generator Expressions") .. [#pep289] PEP 289 ("Generator Expressions")
http://www.python.org/dev/peps/pep-0289 http://www.python.org/dev/peps/pep-0289