Huh? func_defaults, default values in function calls

Thomas Wouters thomas at xs4all.net
Wed Apr 12 01:58:15 EDT 2000


On Tue, Apr 11, 2000 at 09:17:10PM -0400, Mark Hathaway wrote:

> > I think this is the first time I've seen show up with dictionaries, usually
> > is shows up with lists.

> At least this idiom gets the job done, but it sincerely defeats the
> idea of having default values to have to say "z=None".

Not really. I agree that it is slightly counter-intuitive, which is very
suprising in Python, but it adds a pretty valuable construct -- that of a
'static' variable in C. I dont think there is another way to do that, except
global variables or using an explicit namespace. As for the use of default
values, the use stays in the case of immutable values, and also for mutable
values which you do not mutilate.

mutable-as-in-mutiny?-ly y'rs,
-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list