Bizarre method keyword-arg bug.

Jasper jasper at peak.org
Mon Aug 18 06:20:11 EDT 2008


On Aug 18, 3:04 am, Paul Boddie <p... at boddie.org.uk> wrote:
>
> Well, in the page of "Python warts" that I compiled when it was
> claimed that Python 3000 addresses such issues in Python 2.x, the
> "Mutable default arguments" entry lists at least one experienced
> Python author who agrees with the inquirer's assertion:
>
> http://wiki.python.org/moin/PythonWarts
>
> Paul

Not surprising, as it's fairly non-standard.  I'd even argue that
calling them "default arguments" is a misnomer -- they're more akin to
static variables.

It doesn't help that the solution to get the expected behavior
involves adding boiler-plate code all over.

-Jasper



More information about the Python-list mailing list