[Python-Dev] Extending tuple unpacking

Nick Coghlan ncoghlan at gmail.com
Thu Oct 13 11:47:31 CEST 2005


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.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com


More information about the Python-Dev mailing list