changeset: 76017:b3a7b27953e0 branch: 2.7 parent: 76012:9411b7268cf5 user: R David Murray date: Sat Mar 31 12:10:48 2012 -0400 files: Lib/pydoc.py description: #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, and without this fix when we switch over to the 3.x docs being current, 2.7 would have pointed to the python3 tutorial. diff -r 9411b7268cf5 -r b3a7b27953e0 Lib/pydoc.py --- a/Lib/pydoc.py Sat Mar 31 17:22:47 2012 +0200 +++ b/Lib/pydoc.py Sat Mar 31 12:10:48 2012 -0400 @@ -1799,7 +1799,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 @@ -1809,7 +1809,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 = items[:]

AltStyle によって変換されたページ (->オリジナル) /