[Python-Dev] Very Strange Argument Handling Behavior (original) (raw)
Guido van Rossum guido at python.org
Sat Apr 17 18:49:25 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 Sat, Apr 17, 2010 at 9:22 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
Guido van Rossum wrote:
Because Python promises that the object the callee sees as 'kwargs' is "just a dict". Huh, I thought kwargs was allowed to be implemented as a string-keys-only dict (similar to class and module namespaces) while still be a valid Python implementation. I guess I was wrong.
Actually I don't know about that. Is there language anywhere in the language reference that says this? What do IronPython, Jython, PyPy actually do?
In any case my line of reasoning in this case isn't affected by this; as I pointed out in my reply to Steve, the relation between the **k passed in by the caller and the **k received by the callee is less direct than you might think. The proposed change only affects the dict() builtin; any change in the type of **k seen by the callee would potentially affect all user-defined functions.
-- --Guido van Rossum (python.org/~guido)
- 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 ]