Python's "only one way to do it" philosophy isn't good?

Michele Simionato michele.simionato at
Mon Jun 25 07:41:17 CEST 2007

On Jun 23, 6:39 pm, Douglas Alan <d... at> wrote:
> One of the things that annoys me when coding in Python (and this is a
> flaw that even lowly Perl has a good solution for), is that if you do
> something like
>      longVarableName = foo(longVariableName)
> You end up with a bug that can be very hard to track down.

You should really be using pychecker (as well as Emacs autocompletion
feature ...):

~$ cat
def foo(x): return x

longVariableName = 1
longVarableName = foo(longVariableName)

~$ pychecker -v
Processing x...

Warnings... Variable (longVarableName) not used

[I know you will not be satisfied with this, but pychecker is really
since it catches many other errors that no amount of macroprogramming
evere remove].

       Michele Simionato

More information about the Python-list mailing list