[Python-checkins] peps: PEP 416: add the default value of a function argument use case

victor.stinner python-checkins at python.org
Sun Mar 4 00:07:12 CET 2012


http://hg.python.org/peps/rev/f519d34d9704
changeset:   4105:f519d34d9704
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Sun Mar 04 00:07:10 2012 +0100
summary:
  PEP 416: add the default value of a function argument use case

files:
  pep-0416.txt |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/pep-0416.txt b/pep-0416.txt
--- a/pep-0416.txt
+++ b/pep-0416.txt
@@ -42,6 +42,8 @@
  * frozendict avoids the need of a read-only proxy in some cases. frozendict is
    faster than a proxy because getting an item in a frozendict is a fast lookup
    whereas a proxy requires a function call.
+ * use a frozendict as the default value of function argument: avoid the
+   problem of mutable default argument.
 
 
 Constraints

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list