[Python-checkins] r51479 - peps/trunk/pep-0362.txt
brett.cannon
python-checkins at python.org
Tue Aug 22 19:30:17 CEST 2006
Author: brett.cannon
Date: Tue Aug 22 19:30:16 2006
New Revision: 51479
Modified:
peps/trunk/pep-0362.txt
Log:
Remove Open Issue of whether keyword-only parameters should be kept in a
separate set instead of the 'parameters' attribute on Signature objects.
Also strengthen the argument for keeping keyword_only as an attribute instead
of setting position to None to flag this state.
Modified: peps/trunk/pep-0362.txt
==============================================================================
--- peps/trunk/pep-0362.txt (original)
+++ peps/trunk/pep-0362.txt Tue Aug 22 19:30:16 2006
@@ -112,9 +112,13 @@
that holds a boolean representing whether the parameter is
keyword-only or not.
-As to whether the keyword-only parameters should be stored in the
-``parameters`` attribute of a Signature object or in a set is
-discussed in `Open Issues`_.
+Nick Coghlan suggested to set 'position' to None to signal that the
+argument is keyword-only and thus remove the need for the new
+attribute. But that would cause different types to be used in the
+attribute that are in no way compatible. It also removes the ability
+to know the position number within the signature from the Paramter
+object itself. Plus Guido preferred the original approach over this
+alternative.
Open Issues
@@ -131,23 +135,6 @@
needed, and then return the value of ``__signature__``.
-Where should keyword-only parameters be stored in the Signature object?
------------------------------------------------------------------------
-
-If PEP 3102 [#pep-3102]_ ends up being accepted, there is the
-possibility that storing keyword-only parameters in a set instead of
-in the ``parameters`` attribute of the Signature object makes more
-sense. Since keyword-only parameters do not have any semantic meaning
-in terms of their position within the signature, there is no direct
-semantic gain in storing it in the parameter list.
-
-Storing keyword-only paramaters in a set makes it much more explicit
-that keyword-only parameters have no inherent order. It does have the
-drawback, though, that if one wants to process all parameters at once
-they would need to perform extra work to make sure to go through both
-the parameter list and set.
-
-
References
==========
More information about the Python-checkins
mailing list