[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread SilentGhost

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread Ben Schreib

New submission from Ben Schreib:

The example given in section 5.3 shows an output of "t[0] = 8" 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] = 8

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

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com