The most annoying typo error...
Peter Ballard
pballard at ozemail.com.au
Wed May 7 20:10:14 EDT 2003
Skip Montanaro <skip at pobox.com> wrote in message news:<mailman.1052304979.20874.python-list at python.org>...
> Peter> ....Is when I do something like this:
>
> Peter> x = somefunction(a, b, c, d),
>
> Peter> and when I run Python I get a TypeError error.
>
> What background do you have that makes you terminate function calls (or
> language statements) with a comma? The problem you're experiencing is one
> I've never personally encountered.
Cut and paste.
I start out with something like:
function1( var1, var2, somefunction(a, b, c, d),
someotherfunction(e, f, g))
function2( var3, var4, somefunction(a, b, c, d),
yetotherfunction(h, i, j))
Then I realise I've got a duplicate function call, so I make a
variable:
x = somefunction(a, b, c, d),
But when I cut and paste from the line(s) above, I accidentally leave
the comma in.
At a guess, it's happened about 4 times in the last 6 months. Each
time it has been very frustrating to track down.
> PyChecker enhancement maybe?
Thanks for the tip.
Regards,
Peter Ballard
Adelaide, AUSTRALIA
pballard at ozemail.com.au
http://www.ozemail.com.au/~pballard/
More information about the Python-list
mailing list