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/2008-May/079777.html below:

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

[Python-Dev] itertools additions: one(), single_valued()Andreas Klöckner lists at informa.tiker.net
Mon May 26 23:18:21 CEST 2008
On Montag 26 Mai 2008, Boris Borcic wrote:
> > 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.

True, thanks for pointing this out. :)

I guess the only places where my functions are useful are

a) if you don't want the intermediate result in a variable
or
b) if you can't stomach the storage for the set.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/python-dev/attachments/20080526/ab58abcb/attachment-0001.pgp>
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