[Python-checkins] r53265 - peps/trunk/pep-3107.txt
collin.winter
python-checkins at python.org
Fri Jan 5 17:59:58 CET 2007
Author: collin.winter
Date: Fri Jan 5 17:59:58 2007
New Revision: 53265
Modified:
peps/trunk/pep-3107.txt
Log:
Clarify that the annotation dictionaries are mutable
Modified: peps/trunk/pep-3107.txt
==============================================================================
--- peps/trunk/pep-3107.txt (original)
+++ peps/trunk/pep-3107.txt Fri Jan 5 17:59:58 2007
@@ -161,8 +161,8 @@
Once compiled, a function's annotations are available via the
function's ``func_annotations`` attribute. This attribute is
-a dictionary, mapping parameter names to an object representing
-the evaluated annotation expression
+a mutable dictionary, mapping parameter names to an object
+representing the evaluated annotation expression
There is a special key in the ``func_annotations`` mapping,
``"return"``. This key is present only if an annotation was supplied
@@ -184,9 +184,9 @@
of a parameter; any attempt to use ``return`` as a parameter name
would result in a ``SyntaxError``.
-``func_annotations`` is an empty dictionary if no there are no
-annotations on the function. ``func_annotations`` is always an empty
-dictionary for functions created from ``lambda`` expressions.
+``func_annotations`` is an empty, mutable dictionary if there are no
+annotations on the function or if the functions was created from
+a ``lambda`` expression.
Use Cases
=========
More information about the Python-checkins
mailing list