[Python-Dev] Proposal: Allow any mapping after ** in calls (original) (raw)
Georg Brandl g.brandl at gmx.net
Wed Apr 18 18:34:36 CEST 2007
- Previous message: [Python-Dev] minidom -> new-style classes?
- Next message: [Python-Dev] Proposal: Allow any mapping after ** in calls
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alexander Belopolsky schrieb:
Python allows arbitrary sequences after * in calls, but an expression following ** must be a (subclass of) dict. I believe * and ** should be treated similarly and since f(*UserList(..)) is valid, f(**UserDict(..)) should be valid as well.
Of course, I can work around this limitation by writing f(**dict(UserDict(..))), but this is unnatural given that I don't have to do f(*tuple(UserList(..))). I have submitted a patch on SF that makes Python accept arbitrary mappings after **.
Ping! Nobody interested in this?
Georg
- Previous message: [Python-Dev] minidom -> new-style classes?
- Next message: [Python-Dev] Proposal: Allow any mapping after ** in calls
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]