Should Python raise a warning for mutable default arguments?

BJörn Lindqvist bjourne at gmail.com
Sat Aug 23 09:44:48 EDT 2008


2008/8/22 Peter Otten <__peter__ at web.de>:
> bearophileHUGS at lycos.com wrote:
>
>> DrScheme is an implementation of Scheme that is very newbie-friendly.
>> It has several limited sub-languages, etc.
>>
>> So maybe a command line option can be added to Python3 ( -
>> newbie ? :-) ) that just switches on similar warnings, to help newbies
>> (in schools, where there's a teacher that encourages to always use
>> that command line option) avoid some of the most common traps.
>
> Or maybe bundle pychecker with idle?

I think that is an excellent idea! In fact why can't pychecker be
included in the standard distribution? I'd love it if compilation was
done with pychecker checking by default. Python could definitely use a
-Wall mode.


-- 
mvh Björn



More information about the Python-list mailing list