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/2015-February/138107.html below:

[Python-Dev] (no subject)

[Python-Dev] (no subject)Greg Ewing greg.ewing at canterbury.ac.nz
Tue Feb 10 07:04:03 CET 2015
Donald Stufft wrote:
> 
> perhaps a better 
> solution is to simply make it so that something like ``a_list + 
> an_iterable`` is valid and the iterable would just be consumed and +’d 
> onto the list.

I don't think I like the asymmetry that this would
introduce into + on lists. Currently

    [1, 2, 3] + (4, 5, 6)

is an error because it's not clear whether the
programmer intended the result to be a list or
a tuple. I think that's a good thing.

Also, it would mean that

    [1, 2, 3] + foo == [1, 2, 3, "f", "o", "o"]

which would be surprising and probably not what
was intended.

-- 
Greg
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