Python's "only one way to do it" philosophy isn't good?
Michele Simionato
michele.simionato at gmail.com
Mon Jun 25 01:41:17 EDT 2007
On Jun 23, 6:39 pm, Douglas Alan <d... at alum.mit.edu> 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 x.py
def foo(x): return x
longVariableName = 1
longVarableName = foo(longVariableName)
~$ pychecker -v x.py
Processing x...
Warnings...
x.py:4: Variable (longVarableName) not used
[I know you will not be satisfied with this, but pychecker is really
useful,
since it catches many other errors that no amount of macroprogramming
would
evere remove].
Michele Simionato
More information about the Python-list
mailing list