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/2007-March/072321.html below:

[Python-Dev] Proposal: Allow any mapping after ** in calls

[Python-Dev] Proposal: Allow any mapping after ** in calls [Python-Dev] Proposal: Allow any mapping after ** in callsAlexander Belopolsky alexander.belopolsky at gmail.com
Fri Mar 23 20:45:51 CET 2007
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>.
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