mutable default parameter problem [Prothon]

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Jun 16 11:09:29 CEST 2004


On Tue, 15 Jun 2004 22:01:19 -0800, Troy Melhase wrote:

> Or even this:
> 
> shared_cache = {}
> 
> def F(a, b, cache=shared_cache):
>     ...

This would work in the 2nd scheme.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/




More information about the Python-list mailing list