A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-June/080813.html below:

[Python-Dev] repeated keyword arguments

[Python-Dev] repeated keyword argumentstomer filiba tomerfiliba at gmail.com
Sat Jun 28 10:30:38 CEST 2008
On Jun 28, 12:56 am, "Guido van Rossum" <gu... at python.org> wrote:
> No, it could just be a harmless typo in a long argument list.

to elaborate on this point a little, i came across this error when i
ported my code to 2.4. i used the optparse class which takes 10's of
kwargs, and it turned out i'd given the same parameter twice (the
infamous copy-paste problem).

so on the one hand, it was a harmless typo (because the latest
instance was taken). on the other hand, it's a good thing i tested it
on 2.4, or i'd never notice the repeated argument, which may have led
to weird runtime errors (if the order of the params was changed).

i'd be in favor of fixing this in 2.5, just to eliminate possibly hard-
to-debug runtime errors. since it's a syntax error, it would be early-
noticed when the code is first run/imported, and it wouldn't require
the original author of the code to fix.


-tomer
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4