Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
6f3f9a4c
Kaydet (Commit)
6f3f9a4c
authored
Şub 27, 2001
tarafından
Ka-Ping Yee
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add display of $Revision $ and credits.
üst
969ab271
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
10 deletions
+33
-10
pydoc.py
Lib/pydoc.py
+33
-10
No files found.
Lib/pydoc.py
Dosyayı görüntüle @
6f3f9a4c
...
...
@@ -20,7 +20,13 @@ In the Python interpreter, do "from pydoc import help" to provide online
help. Calling help(thing) on a Python object documents the object."""
__author__
=
"Ka-Ping Yee <ping@lfw.org>"
__version__
=
"26 February 2001"
__date__
=
"26 February 2001"
__version__
=
"$Revision $"
__credits__
=
"""Tommy Burnette, the original creator of manpy.
Paul Prescod, for all his work on onlinehelp.
Richard Chamberlain, for the first implementation of textdoc.
A moose bit my sister once."""
import
sys
,
imp
,
os
,
stat
,
re
,
types
,
inspect
from
repr
import
Repr
...
...
@@ -383,8 +389,16 @@ class HTMLDoc(Doc):
filelink
=
'<a href="file:
%
s">
%
s</a>'
%
(
file
,
file
)
except
TypeError
:
filelink
=
'(built-in)'
info
=
[]
if
hasattr
(
object
,
'__version__'
):
head
=
head
+
' (version:
%
s)'
%
self
.
escape
(
object
.
__version__
)
version
=
str
(
object
.
__version__
)
if
version
[:
11
]
==
'$Revision$'
:
version
=
version
[
11
:
-
1
]
info
.
append
(
'version:
%
s'
%
self
.
escape
(
version
))
if
hasattr
(
object
,
'__date__'
):
info
.
append
(
self
.
escape
(
str
(
object
.
__date__
)))
if
info
:
head
=
head
+
' (
%
s)'
%
join
(
info
,
', '
)
result
=
result
+
self
.
heading
(
head
,
'#ffffff'
,
'#7799ee'
,
'<a href=".">index</a><br>'
+
filelink
)
...
...
@@ -463,6 +477,16 @@ class HTMLDoc(Doc):
result
=
result
+
self
.
bigsection
(
'Constants'
,
'#ffffff'
,
'#55aa55'
,
contents
)
if
hasattr
(
object
,
'__author__'
):
contents
=
self
.
markup
(
str
(
object
.
__author__
),
self
.
preformat
)
result
=
result
+
self
.
bigsection
(
'Author'
,
'#ffffff'
,
'#7799ee'
,
contents
)
if
hasattr
(
object
,
'__credits__'
):
contents
=
self
.
markup
(
str
(
object
.
__credits__
),
self
.
preformat
)
result
=
result
+
self
.
bigsection
(
'Credits'
,
'#ffffff'
,
'#7799ee'
,
contents
)
return
result
def
docclass
(
self
,
object
,
funcs
=
{},
classes
=
{}):
...
...
@@ -694,16 +718,15 @@ class TextDoc(Doc):
if
hasattr
(
object
,
'__version__'
):
version
=
str
(
object
.
__version__
)
if
hasattr
(
object
,
'__date__'
)
:
version
=
version
+
', '
+
str
(
object
.
__date__
)
if
version
[:
11
]
==
'$Revision$'
:
version
=
version
[
11
:
-
1
]
result
=
result
+
self
.
section
(
'VERSION'
,
version
)
if
hasattr
(
object
,
'__date__'
):
result
=
result
+
self
.
section
(
'DATE'
,
str
(
object
.
__date__
))
if
hasattr
(
object
,
'__author__'
):
author
=
str
(
object
.
__author__
)
if
hasattr
(
object
,
'__email__'
):
author
=
author
+
' <'
+
str
(
object
.
__email__
)
+
'>'
result
=
result
+
self
.
section
(
'AUTHOR'
,
author
)
result
=
result
+
self
.
section
(
'AUTHOR'
,
str
(
object
.
__author__
))
if
hasattr
(
object
,
'__credits__'
):
result
=
result
+
self
.
section
(
'CREDITS'
,
str
(
object
.
__credits__
))
return
result
def
docclass
(
self
,
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