[Python-ideas] Default arguments in Python
Oleg Broytmann
phd at phd.pp.ru
Fri May 15 21:50:15 CEST 2009
On Fri, May 15, 2009 at 03:33:13PM -0400, Terry Reedy wrote:
> Curt Hagenlocher wrote:
>> 1. Preventing the "noob" mistake of saying "def f(x = {})" and
>> expecting that a new empty dictionary will be produced for each call,
>> and
>
> As a couple of us have suggested, this, like similar jobs, should be
> handled by program checkers. I leave it to someone else to see if
> existing programs already check and warn
PyLint certainly does.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas
mailing list