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
1ec60d67
Commit
1ec60d67
authored
Mar 23, 2001
by
Ka-Ping Yee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small formatting improvements.
parent
ede0ddbc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
Lib/pydoc.py
Lib/pydoc.py
+13
-10
No files found.
Lib/pydoc.py
View file @
1ec60d67
...
@@ -269,9 +269,9 @@ class HTMLDoc(Doc):
...
@@ -269,9 +269,9 @@ class HTMLDoc(Doc):
<table width="100%%" cellspacing=0 cellpadding=2 border=0>
<table width="100%%" cellspacing=0 cellpadding=2 border=0>
<tr bgcolor="%s">
<tr bgcolor="%s">
<td valign=bottom><small> <br></small
<td valign=bottom><small> <br></small
><font color="%s" face="helvetica"> <br>%s</font></td
><font color="%s" face="helvetica
, arial
"> <br>%s</font></td
><td align=right valign=bottom
><td align=right valign=bottom
><font color="%s" face="helvetica">%s</font></td></tr></table>
><font color="%s" face="helvetica
, arial
">%s</font></td></tr></table>
'''
%
(
bgcol
,
fgcol
,
title
,
fgcol
,
extras
or
' '
)
'''
%
(
bgcol
,
fgcol
,
title
,
fgcol
,
extras
or
' '
)
def
section
(
self
,
title
,
fgcol
,
bgcol
,
contents
,
width
=
20
,
def
section
(
self
,
title
,
fgcol
,
bgcol
,
contents
,
width
=
20
,
...
@@ -287,8 +287,10 @@ class HTMLDoc(Doc):
...
@@ -287,8 +287,10 @@ class HTMLDoc(Doc):
'''
%
(
bgcol
,
fgcol
,
title
)
'''
%
(
bgcol
,
fgcol
,
title
)
if
prelude
:
if
prelude
:
result
=
result
+
'''
result
=
result
+
'''
<tr bgcolor="%s"><td>%s</td>
<tr bgcolor="%s"><td rowspan=2>%s</td>
<td colspan=2>%s</td></tr>'''
%
(
bgcol
,
marginalia
,
prelude
)
<td colspan=2>%s</td></tr>
<tr><td>%s</td>'''
%
(
bgcol
,
marginalia
,
prelude
,
gap
)
else
:
result
=
result
+
'''
result
=
result
+
'''
<tr><td bgcolor="%s">%s</td><td>%s</td>'''
%
(
bgcol
,
marginalia
,
gap
)
<tr><td bgcolor="%s">%s</td><td>%s</td>'''
%
(
bgcol
,
marginalia
,
gap
)
...
@@ -556,7 +558,7 @@ class HTMLDoc(Doc):
...
@@ -556,7 +558,7 @@ class HTMLDoc(Doc):
title
=
title
+
'(%s)'
%
join
(
parents
,
', '
)
title
=
title
+
'(%s)'
%
join
(
parents
,
', '
)
doc
=
self
.
markup
(
doc
=
self
.
markup
(
getdoc
(
object
),
self
.
preformat
,
funcs
,
classes
,
mdict
)
getdoc
(
object
),
self
.
preformat
,
funcs
,
classes
,
mdict
)
doc
=
self
.
small
(
'<tt>%s<br> </tt>'
%
doc
)
doc
=
self
.
small
(
doc
and
'<tt>%s<br> </tt>'
%
doc
or
'<tt> </tt>'
)
return
self
.
section
(
title
,
'#000000'
,
'#ffc8d8'
,
contents
,
10
,
doc
)
return
self
.
section
(
title
,
'#000000'
,
'#ffc8d8'
,
contents
,
10
,
doc
)
def
formatvalue
(
self
,
object
):
def
formatvalue
(
self
,
object
):
...
@@ -584,7 +586,7 @@ class HTMLDoc(Doc):
...
@@ -584,7 +586,7 @@ class HTMLDoc(Doc):
skipdocs
=
1
skipdocs
=
1
else
:
else
:
note
=
(
object
.
im_self
and
note
=
(
object
.
im_self
and
'method of '
+
self
.
repr
(
object
.
im_self
)
or
'
method of '
+
self
.
repr
(
object
.
im_self
)
or
' unbound %s method'
%
object
.
im_class
.
__name__
)
' unbound %s method'
%
object
.
im_class
.
__name__
)
object
=
object
.
im_func
object
=
object
.
im_func
...
@@ -610,15 +612,16 @@ class HTMLDoc(Doc):
...
@@ -610,15 +612,16 @@ class HTMLDoc(Doc):
decl
=
'<em>lambda</em>'
decl
=
'<em>lambda</em>'
argspec
=
argspec
[
1
:
-
1
]
# remove parentheses
argspec
=
argspec
[
1
:
-
1
]
# remove parentheses
decl
=
title
+
argspec
+
(
note
and
self
.
small
(
self
.
grey
(
note
)))
decl
=
title
+
argspec
+
(
note
and
self
.
small
(
self
.
grey
(
'<font face="helvetica, arial">%s</font>'
%
note
)))
if
skipdocs
:
if
skipdocs
:
return
'<dl><dt>%s</dl>'
%
decl
return
'<dl><dt>%s</dl>
\
n
'
%
decl
else
:
else
:
doc
=
self
.
markup
(
doc
=
self
.
markup
(
getdoc
(
object
),
self
.
preformat
,
funcs
,
classes
,
methods
)
getdoc
(
object
),
self
.
preformat
,
funcs
,
classes
,
methods
)
doc
=
doc
and
'<tt>%s</tt>'
%
doc
doc
=
doc
and
'<tt>%s</tt>'
%
doc
return
'<dl><dt>%s<dd>%s</dl>'
%
(
decl
,
self
.
small
(
doc
))
return
'<dl><dt>%s<dd>%s</dl>
\
n
'
%
(
decl
,
self
.
small
(
doc
))
def
docother
(
self
,
object
,
name
=
None
):
def
docother
(
self
,
object
,
name
=
None
):
"""Produce HTML documentation for a data object."""
"""Produce HTML documentation for a data object."""
...
...
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