From 6e7b0815b441a360b650d42fae51dfef85839bb7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 4 Mar 2012 00:07:10 +0100 Subject: [PATCH] PEP 416: add the default value of a function argument use case --- pep-0416.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pep-0416.txt b/pep-0416.txt index 896556d9d..1ad829586 100644 --- a/pep-0416.txt +++ b/pep-0416.txt @@ -42,6 +42,8 @@ Use cases: * 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