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.

classification
Title: Impossible ... line in tutorial
Type: enhancement Stage: resolved
Components: Documentation Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Ramchandra Apte, docs@python, ezio.melotti
Priority: normal Keywords:

Created on 2012-09-24 14:19 by Ramchandra Apte, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg171138 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-09-24 14:19
In http://docs.python.org/dev/tutorial/introduction.html, there is an ... line which is impossible in that case:

Variables must be “defined” (assigned a value) before they can be used, or an error will occur:

>>>
>>> # try to access an undefined variable
... n
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'n' is not defined

It should be:

>>> n # try to access an undefined variable
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'n' is not defined
msg171140 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-09-24 14:22
Is it?

Python 3.2.3 (default, May  3 2012, 15:54:42) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> # try to access an undefined variable
... n
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
NameError: name 'n' is not defined
>>>
History
Date User Action Args
2022-04-11 14:57:36adminsetgithub: 60222
2012-09-24 14:22:16ezio.melottisetstatus: open -> closed

type: enhancement

nosy: + ezio.melotti
messages: + msg171140
resolution: not a bug
stage: resolved
2012-09-24 14:19:53Ramchandra Aptesetassignee: docs@python

components: + Documentation
nosy: + docs@python
2012-09-24 14:19:29Ramchandra Aptecreate