classification
Title: Incorrect startup header in tutorial
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Ramchandra Apte, chris.jerdonek, docs@python, eric.araujo, ezio.melotti, python-dev
Priority: normal Keywords:

Created on 2012-09-24 13:53 by Ramchandra Apte, last changed 2012-09-25 11:39 by chris.jerdonek. This issue is now closed.

Messages (12)
msg171126 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-09-24 13:53
In http://docs.python.org/py3k/tutorial/interpreter.html#interactive-mode , the header shown is "Python 3.2 (py3k, Sep 12 2007, 12:21:02)". Python 3.2 was no made in Sep 12 2007, so it could not be compiled at that time.
It should be a correct date or the date of today.
msg171134 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-09-24 14:12
Looks like the version got updated but not the rest, even the 3.3 doc has the same date.
msg171135 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-09-24 14:14
The later lines also needs to be updated.
msg171136 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-09-24 14:17
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
msg171137 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-09-24 14:18
Oops! The last message should be in a new issue.
msg171139 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-09-24 14:20
I'm not sure it's worth updating it, it will probably get outdated again when new versions are released.  Also this is just an example, the actual header and dates might be different depending on the version/.OS/compiler.
msg171207 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-09-25 01:03
Suggest closing: I think this causes no issue and changing it would have no benefit.
msg171209 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-09-25 02:38
New changeset 5f4841977bee by Chris Jerdonek in branch '3.2':
Issue #16015: Fix NameError doctest example in tutorial introduction.
http://hg.python.org/cpython/rev/5f4841977bee

New changeset dae33c2e916b by Chris Jerdonek in branch 'default':
Issue #16015: Merge fix from 3.2.
http://hg.python.org/cpython/rev/dae33c2e916b

New changeset 878c33d2f301 by Chris Jerdonek in branch '2.7':
Issue #16015: Fix NameError doctest example in tutorial introduction.
http://hg.python.org/cpython/rev/878c33d2f301
msg171210 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-09-25 03:07
I don't mind fixing the year suggestion (in the interest of "realism" and for practice).
msg171234 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-09-25 09:32
OK.  If you change the date also change s/py3k/default/, py3k was used on the SVN days.  Here is what my header looks like:

$ python3
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.

While you are at it, you could also add .. code-block:: sh.
msg171252 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-09-25 11:35
New changeset d2df5bc89fc9 by Chris Jerdonek in branch '3.2':
Issue #16015: Make welcome message more realistic in tutorial example.
http://hg.python.org/cpython/rev/d2df5bc89fc9

New changeset fcb5bc824e3e by Chris Jerdonek in branch 'default':
Issue #16015: Merge and update from 3.2.
http://hg.python.org/cpython/rev/fcb5bc824e3e
msg171253 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-09-25 11:39
Fixed, and thanks for the report!

(Ezio, I didn't add "code-block:: sh" because it resulted in some undesired highlighting in the interpreter portion when I tried it.)
History
Date User Action Args
2012-09-25 11:39:42chris.jerdoneksetstatus: open -> closed
resolution: fixed
messages: + msg171253

stage: resolved
2012-09-25 11:35:21python-devsetmessages: + msg171252
2012-09-25 09:32:46ezio.melottisettype: enhancement ->
messages: + msg171234
stage: needs patch -> (no value)
2012-09-25 03:07:24chris.jerdoneksetnosy: + chris.jerdonek
messages: + msg171210
2012-09-25 02:38:25python-devsetnosy: + python-dev
messages: + msg171209
2012-09-25 01:03:03eric.araujosetnosy: + eric.araujo
messages: + msg171207
2012-09-24 14:20:03ezio.melottisetmessages: + msg171139
versions: + Python 3.2, Python 3.3
2012-09-24 14:18:47Ramchandra Aptesettitle: impossible ... line in tutorial -> Incorrect startup header in tutorial
2012-09-24 14:18:17Ramchandra Aptesetmessages: + msg171137
2012-09-24 14:17:28Ramchandra Aptesetmessages: + msg171136
title: Incorrect startup header in tutorial -> impossible ... line in tutorial
2012-09-24 14:14:31Ramchandra Aptesetmessages: + msg171135
2012-09-24 14:12:18ezio.melottisetnosy: + ezio.melotti
messages: + msg171134

type: enhancement
stage: needs patch
2012-09-24 13:53:01Ramchandra Aptecreate