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/2005-October/057264.html below:

[Python-Dev] Extending tuple unpacking

[Python-Dev] Extending tuple unpackingSteve Holden steve at holdenweb.com
Thu Oct 13 12:55:52 CEST 2005
Nick Coghlan wrote:
> Ron Adam wrote:
> 
>>I wonder if you make '*' work outside of functions arguments lists, if
>>requests to do the same for '**' would follow?
> 
> 
> Only if keyword unpacking were to be permitted elsewhere first. That is:
> 
> Py> data = dict(a=1, b=2, c=3)
> Py> (a, b, c) = **data
> Py> print a, b, c
> (1, 2, 3)
> 
> Cheers,
> Nick.
> 
This gets too weird, though. What about:

   (a, **d) = **data

Should this be equivalent to

   a = 1
   d = dict(b=2, c=3)

? Basically I suspect we are heading towards the outer limits here.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/

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