[issue25808] The Python Tutorial 5.3. Tuples and Sequences

New submission from Ben Schreib: The example given in section 5.3 shows an output of "t[0] = 88888" but I believe it should be "t[0] = 12345"
t (12345, 54321, 'hello!') # Tuples may be nested: ... u = t, (1, 2, 3, 4, 5) u ((12345, 54321, 'hello!'), (1, 2, 3, 4, 5)) # Tuples are immutable: ... t[0] = 88888
---------- assignee: docs@python components: Documentation messages: 255962 nosy: Ben Schreib, docs@python priority: normal severity: normal status: open title: The Python Tutorial 5.3. Tuples and Sequences type: enhancement versions: Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25808> _______________________________________

SilentGhost added the comment: No, what this piece of code shows is that trying to assign a value to a tuple element will cause an error. Of course, the same error would be raise when using the the value 12345, but it's more instructive to use a different value to not confuse the reader. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25808> _______________________________________
participants (2)
-
Ben Schreib
-
SilentGhost