]> granicus.if.org Git - python/commitdiff
#14434: make tutorial link in 'help' banner version-specific
authorR David Murray <rdmurray@bitdance.com>
Sat, 31 Mar 2012 16:06:35 +0000 (12:06 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 31 Mar 2012 16:06:35 +0000 (12:06 -0400)
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.

Lib/pydoc.py

index f45d46170e2ded34e5ee80b8613a1f65a8ac0f3b..89fd09b55670bbf805b27ce543c694d1c9bf7ae0 100755 (executable)
@@ -1829,7 +1829,7 @@ has the same effect as typing a particular string at the help> prompt.
 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
@@ -1839,7 +1839,7 @@ To get a list of available modules, keywords, or topics, type "modules",
 "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))