[Python-checkins] cpython (merge 3.2 -> default): Merge #14434: make tutorial link in 'help' banner version-specific

r.david.murray python-checkins at python.org
Sat Mar 31 18:11:18 CEST 2012


http://hg.python.org/cpython/rev/ee9b6574b497
changeset:   76016:ee9b6574b497
parent:      76014:a51764ed57a2
parent:      76015:d478c0a68bcb
user:        R David Murray <rdmurray at bitdance.com>
date:        Sat Mar 31 12:08:59 2012 -0400
summary:
  Merge #14434: make tutorial link in 'help' banner version-specific

Without this fix, both 2.7 and 3.x would always point to the "current"
docs...which means that before this fix python 3.2 'help' pointed to the 2.7
tutorial.

files:
  Lib/pydoc.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/pydoc.py b/Lib/pydoc.py
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1826,7 +1826,7 @@
 Welcome to Python %s!  This is the online help utility.
 
 If this is your first time using Python, you should definitely check out
-the tutorial on the Internet at http://docs.python.org/tutorial/.
+the tutorial on the Internet at http://docs.python.org/%s/tutorial/.
 
 Enter the name of any module, keyword, or topic to get help on writing
 Python programs and using Python modules.  To quit this help utility and
@@ -1836,7 +1836,7 @@
 "keywords", or "topics".  Each module also comes with a one-line summary
 of what it does; to list the modules whose summaries contain a given word
 such as "spam", type "modules spam".
-''' % sys.version[:3])
+''' % tuple([sys.version[:3]]*2))
 
     def list(self, items, columns=4, width=80):
         items = list(sorted(items))

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list