summaryrefslogtreecommitdiff
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-11 13:10:36 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-11 13:10:36 +0200
commit885bdc4946890f4bb80557fab80c3874b2cc4d39 (patch)
treebe6280757afecfd1b41c886f651d6cafae384df1 /Lib/pydoc.py
parenta9725f86a984f74e74f09c4808fc8f4b403728b2 (diff)
downloadcpython-git-885bdc4946890f4bb80557fab80c3874b2cc4d39.tar.gz
Issue #25985: sys.version_info is now used instead of sys.version
to format short Python version.
Diffstat (limited to 'Lib/pydoc.py')
-rw-r--r--Lib/pydoc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index a73298d715..5e5a8aeaa5 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1911,10 +1911,10 @@ has the same effect as typing a particular string at the help> prompt.
def intro(self):
self.output.write('''
-Welcome to Python %s's help utility!
+Welcome to Python {0}'s 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/%s/tutorial/.
+the tutorial on the Internet at http://docs.python.org/{0}/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
@@ -1924,7 +1924,7 @@ To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics". Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".
-''' % tuple([sys.version[:3]]*2))
+'''.format('%d.%d' % sys.version_info[:2]))
def list(self, items, columns=4, width=80):
items = list(sorted(items))