Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b6a87542
Commit
b6a87542
authored
Mar 13, 2007
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
parent
4ffc8f51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
Lib/pydoc.py
Lib/pydoc.py
+3
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/pydoc.py
View file @
b6a87542
...
...
@@ -1511,6 +1511,7 @@ def writedocs(dir, pkgpath='', done=None):
class
Helper
:
keywords
=
{
'and'
:
'BOOLEAN'
,
'as'
:
'with'
,
'assert'
:
(
'ref/assert'
,
''
),
'break'
:
(
'ref/break'
,
'while for'
),
'class'
:
(
'ref/class'
,
'CLASSES SPECIALMETHODS'
),
...
...
@@ -1538,6 +1539,7 @@ class Helper:
'return'
:
(
'ref/return'
,
'FUNCTIONS'
),
'try'
:
(
'ref/try'
,
'EXCEPTIONS'
),
'while'
:
(
'ref/while'
,
'break continue if TRUTHVALUE'
),
'with'
:
(
'ref/with'
,
'CONTEXTMANAGERS EXCEPTIONS yield'
),
'yield'
:
(
'ref/yield'
,
''
),
}
...
...
@@ -1619,6 +1621,7 @@ class Helper:
'LOOPING'
:
(
'ref/compound'
,
'for while break continue'
),
'TRUTHVALUE'
:
(
'lib/truth'
,
'if while and or not BASICMETHODS'
),
'DEBUGGING'
:
(
'lib/module-pdb'
,
'pdb'
),
'CONTEXTMANAGERS'
:
(
'ref/context-managers'
,
'with'
),
}
def
__init__
(
self
,
input
,
output
):
...
...
Misc/NEWS
View file @
b6a87542
...
...
@@ -168,6 +168,9 @@ Core and builtins
Library
-------
- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc'
s
help
keywords
.
-
Patch
#
1555098
:
use
str
.
join
()
instead
of
repeated
string
concatenation
in
robotparser
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment