[issue40911] Unexpected behaviour for += assignment to list inside tuple

2020-06-08 Thread Adam Cmiel
Adam Cmiel added the comment: Got it, I didn't realize that the last step of augmented assignment is (in this case) assigning the result of __iadd__ back to the tuple. Thanks for the explanations! -- ___ Python tracker <https://bugs.python.

[issue40911] Unexpected behaviour for += assignment to list inside tuple

2020-06-08 Thread Adam Cmiel
New submission from Adam Cmiel : Python version: Python 3.8.3 (default, May 15 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux Description: When assigning to a tuple index using +=, if the element at that index is a list, the list is extended and a TypeError is raised