[Python-Dev] itertools additions: one(), single_valued()

Boris Borcic bborcic at gmail.com
Mon May 26 19:47:44 CEST 2008


> Opinions?
> 
> Andreas

my_target, = iterable
my_target, = set(iterable)

quite readably does it, imho, or else one can use

[my_target] = iterable
[my_target] = set(iterable)

the error messages seem also OK.

Cheers, BB








More information about the Python-Dev mailing list