Bizarre behavior with mutable default arguments
Istvan Albert
istvan.albert at gmail.com
Sun Dec 30 09:07:09 EST 2007
On Dec 29, 11:21 pm, bukzor <workithar... at gmail.com> wrote:
> The standard library is not affected because
the people who wrote code into it know how python works.
Programming abounds with cases that some people think should work
differently:
a = b = []
a.append(1)
is b empty or not at this point? Get informed, remember the rules, be
happy and move on to write some cool code.
There is little new in what you say. Every so often someone is having
a confusing time with a feature and therefore proposes that the
language be changed to match his/her expectations.
i.
More information about the Python-list
mailing list