mutable default parameter problem [Prothon]

Marcin 'Qrczak' Kowalczyk qrczak at
Wed Jun 16 00:34:01 CEST 2004

On Tue, 15 Jun 2004 15:07:05 -0700, Mark Hahn wrote:

> Choice 2 is my favorite in that it matches the dynamic nature of Prothon,
> but it is an expensive solution.  Choice 1 is the least expensive solution
> but it is limiting to the user.  Choice 1 does not help the second code
> sample above.  Choice 3 is a good compromise since an object.copy() is
> pretty fast in Prothon.
> Comments?   How much Python code would these different proposals break?

I like 2 the most. Well, actually I like only 2 :-)

I'm not sure why it would be expensive, it's a pity if it's expensive,
but it should be appropriate for most cases and it's easy to understand.

   __("<         Marcin Kowalczyk
   \__/       qrczak at

More information about the Python-list mailing list