A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2015-February/138113.html below:

[Python-Dev] (no subject)

[Python-Dev] (no subject)Neil Girdhar mistersheik at gmail.com
Tue Feb 10 08:29:02 CET 2015
On Tue, Feb 10, 2015 at 2:20 AM, Victor Stinner <victor.stinner at gmail.com>
wrote:

> To be logic, I expect [(*item) for item in mylist] to simply return mylist.
>

If you want simply mylist as a list, that is [*mylist]

> [*(item) for item in mylist] with mylist=[(1, 2), (3,)] could return [1,
> 2, 3],
>
right

> as just [*mylist], so "unpack" mylist.
>

[*mylist] remains equivalent list(mylist), just as it is now.   In one
case, you're unpacking the elements of the list, in the other you're
unpacking the list itself.

Victor
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/mistersheik%40gmail.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150210/d39353cd/attachment.html>
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