Pythonification of the asterisk-based collection packing/unpacking syntax

Chris Angelico rosuav at gmail.com
Sun Dec 18 23:35:06 EST 2011


On Mon, Dec 19, 2011 at 1:23 PM, alex23 <wuwei23 at gmail.com> wrote:
> Except, OMG, list() is RETURNING A LIST, which is an OBVIOUS type
> constraint. I propose that:
>
>    args = @set list(args)
>
> Will coerce args into a list and then give me a set in return.

Point to note:

list,set = set,list  # Request a death sentence from the next maintainer

is perfectly legal code. Now, what does your "args=" line do?

ChrisA



More information about the Python-list mailing list