Proposal: Allow any mapping after ** in calls
23 Mar
2007
23 Mar
'07
7:45 p.m.
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 **. See https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1686487&group_id=5470.
6189
Age (days ago)
6215
Last active (days ago)
2 comments
3 participants
participants (3)
-
Alexander Belopolsky
-
Georg Brandl
-
Guido van Rossum