New submission from Furkan Onder <furkanon...@protonmail.com>:
I am creating the tuple that includes a list and than I am trying to add new value to this list. Interpreter throw the error, but list is changing. I think it doesn't make sense. I think if we throw the type error, list shouldn't be change. >>> tup = ('hi', 'test', ['a','b']) >>> tup[2] += 'c' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'tuple' object does not support item assignment >>> tup ('hi', 'test', ['a', 'b', 'c']) >>> ---------- components: Interpreter Core messages: 416291 nosy: furkanonder priority: normal severity: normal status: open title: Strange behavior on the tuple that includes list versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue47155> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com