[Python-checkins] r54117 - peps/trunk/pep-3113.txt

brett.cannon python-checkins at python.org
Sun Mar 4 20:26:52 CET 2007


Author: brett.cannon
Date: Sun Mar  4 20:26:52 2007
New Revision: 54117

Modified:
   peps/trunk/pep-3113.txt
Log:
Clarify how tuple parameters do not work with PEP 3102 and 3107.


Modified: peps/trunk/pep-3113.txt
==============================================================================
--- peps/trunk/pep-3113.txt	(original)
+++ peps/trunk/pep-3113.txt	Sun Mar  4 20:26:52 2007
@@ -113,9 +113,12 @@
 Consider PEP 3102 (keyword-only arguments) and PEP 3107 (function
 annotations) [#pep-3102]_ [#pep-3107]_.  Both PEPs have been accepted and
 introduce new functionality within a function's signature.  And yet
-for both PEPs the new feature cannot be applied to tuple parameters.
-This leads to tuple parameters not being on the same footing as
-regular parameters that do not attempt to unpack their arguments.
+for both PEPs the new feature cannot be applied to tuple parameters as
+a whole.  PEP 3102 has no support for tuple parameters at all (which
+makes sense as there is no way to reference a tuple parameter by
+name).  PEP 3107 allows annotations for each item within the tuple
+(e.g., ``(x:int, y:int)``), but not the whole tuple (e.g.,
+``(x, y):int``).
 
 The existence of tuple parameters also places sequence objects
 separately from mapping objects in a function signature.  There is no


More information about the Python-checkins mailing list