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
cef5b3d4
Commit
cef5b3d4
authored
Apr 25, 2008
by
Amaury Forgeot d'Arc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated code in pydoc.py, probably a merge conflict some months ago.
Spotted by Humberto Diogenes.
parent
e41251e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
17 deletions
+0
-17
Lib/pydoc.py
Lib/pydoc.py
+0
-17
No files found.
Lib/pydoc.py
View file @
cef5b3d4
...
...
@@ -1500,23 +1500,6 @@ def render_doc(thing, title='Python Library Documentation: %s', forceload=0):
def
doc
(
thing
,
title
=
'Python Library Documentation: %s'
,
forceload
=
0
):
"""Display text documentation, given an object or a path to an object."""
try
:
object
,
name
=
resolve
(
thing
,
forceload
)
desc
=
describe
(
object
)
module
=
inspect
.
getmodule
(
object
)
if
name
and
'.'
in
name
:
desc
+=
' in '
+
name
[:
name
.
rfind
(
'.'
)]
elif
module
and
module
is
not
object
:
desc
+=
' in module '
+
module
.
__name__
elif
not
(
inspect
.
ismodule
(
object
)
or
inspect
.
isclass
(
object
)
or
inspect
.
isroutine
(
object
)
or
inspect
.
isgetsetdescriptor
(
object
)
or
inspect
.
ismemberdescriptor
(
object
)
or
isinstance
(
object
,
property
)):
# If the passed object is a piece of data or an instance,
# document its available methods instead of its value.
object
=
type
(
object
)
desc
+=
' object'
pager
(
render_doc
(
thing
,
title
,
forceload
))
except
(
ImportError
,
ErrorDuringImport
)
as
value
:
print
(
value
)
...
...
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