functions, list, default parameters
roy at panix.com
Mon Nov 8 13:39:46 CET 2010
In article <iao0l0$nd4$5 at lust.ihug.co.nz>,
Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:
> In message <20101021235138.609fe668 at geekmail.INVALID>, Andreas Waldenburger
> > While not very commonly needed, why should a shared default argument be
> > forbidden?
> Because itâs safer to disallow it than to allow it.
The best way to deal with this is to have some kind of knob you can turn
to enable or disable warnings about these sorts of things. Could be a
command-line flag, a stand-alone tool (i.e. pylint), or even something
in-line (like perl' 'use strict' directive).
Good engineering practice would be use enable "debug mode" during
testing and review all the warnings to see which ones surprise you.
More information about the Python-list