[Python-Dev] Very Strange Argument Handling Behavior (original) (raw)
Raymond Hettinger raymond.hettinger at gmail.com
Fri Apr 16 23:56:09 CEST 2010
- Previous message: [Python-Dev] Very Strange Argument Handling Behavior
- Next message: [Python-Dev] Very Strange Argument Handling Behavior
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Apr 16, 2010 at 2:11 PM, Raymond Hettinger <raymond.hettinger at gmail.com> wrote:
Guido van Rossum, 16.04.2010 16:33:
I am fine with declaring dict({}, **{1:3}) illegal, since after all it is abuse of the ** mechanism. ISTM that making it illegal costs cycles with giving any real benefit. Diasagree. The real benefit is better cross-implementation portability.
Would hate for 100% of users will pay a performance penalty when most applications aren't abusing keyword dictionaries so they already work cross-platfrom.
Isn't there anyway to make this a one-time check instead of a PyLint style validation check running on every invocation of a function or method using **kwds?
Or perhaps there can be a switch or flag to enable developers to check for non-standard uses of **kwds. That way, they can clean-up their programs but not make the end users pay for the checks every time they run an application that has already been cleaned-up.
Raymond
- Previous message: [Python-Dev] Very Strange Argument Handling Behavior
- Next message: [Python-Dev] Very Strange Argument Handling Behavior
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]