This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients SilentGhost, ammar2, bruceblosser, steven.daprano
Date 2020-02-16.09:35:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20200216093552.GE3281@ando.pearwood.info>
In-reply-to <1581842726.29.0.751162646788.issue39641@roundup.psfhosted.org>
Content
[Bruce]
> but try this, and it will NOT work:
> 
> FatThing= [(5, 4, "First Place"),
>            (6, 6, "Fifer Place"),
>            (2, 2, "Slowr Place")]
> print(FatThing)  #this works
> 
> FFThing = FatThing + ('22', '32', '55')  #this causes an error!

That is correct, it should cause an error because you are trying to 
concatenate a list and a tuple. This is an easier way to show the same 
behaviour:

    [] + ()  # fails with TypeError

[Bruce]
> however if you change all the members to strings, it will work!!!

I'm afraid you are mistaken. It still fails, as it should.

py> FatThing = [("a", "b", "First Place"),
...             ("c", "d", "Fifer Place"),
...             ("e", "f", "Slowr Place")]
py> FFThing = FatThing + ('22', '32', '55')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "tuple") to list

Please take more care when trying to report what you think is a bug. 
Remember that Python is about 30 years old and there are tens or 
hundreds of thousands of people using it every single day. 99% of the 
time, anything you, or I, find that looks like a bug, is a bug in *our* 
code, not Python. Especially when it is something as basic and 
fundamental as tuple concatenation.
History
Date User Action Args
2020-02-16 09:35:59steven.dapranosetrecipients: + steven.daprano, SilentGhost, ammar2, bruceblosser
2020-02-16 09:35:59steven.dapranolinkissue39641 messages
2020-02-16 09:35:58steven.dapranocreate