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
d02879d6
Kaydet (Commit)
d02879d6
authored
Haz 07, 2003
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Revert 1.25, as overloaded __repr__ is not considered.
üst
e5700033
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
pprint.py
Lib/pprint.py
+8
-8
No files found.
Lib/pprint.py
Dosyayı görüntüle @
d02879d6
...
...
@@ -130,7 +130,7 @@ class PrettyPrinter:
write
=
stream
.
write
if
sepLines
:
if
issubclass
(
typ
,
dict
)
:
if
typ
is
dict
:
write
(
'{'
)
if
self
.
_indent_per_level
>
1
:
write
((
self
.
_indent_per_level
-
1
)
*
' '
)
...
...
@@ -157,8 +157,8 @@ class PrettyPrinter:
write
(
'}'
)
return
if
issubclass
(
typ
,
list
)
or
issubclass
(
typ
,
tuple
)
:
if
issubclass
(
typ
,
list
)
:
if
typ
is
list
or
typ
is
tuple
:
if
typ
is
list
:
write
(
'['
)
endchar
=
']'
else
:
...
...
@@ -179,7 +179,7 @@ class PrettyPrinter:
allowance
+
1
,
context
,
level
)
indent
=
indent
-
self
.
_indent_per_level
del
context
[
objid
]
if
issubclass
(
typ
,
tuple
)
and
length
==
1
:
if
typ
is
tuple
and
length
==
1
:
write
(
','
)
write
(
endchar
)
return
...
...
@@ -207,7 +207,7 @@ class PrettyPrinter:
def
_safe_repr
(
object
,
context
,
maxlevels
,
level
):
typ
=
_type
(
object
)
if
issubclass
(
typ
,
basestring
)
:
if
typ
is
str
:
if
'locale'
not
in
_sys
.
modules
:
return
`object`
,
True
,
False
if
"'"
in
object
and
'"'
not
in
object
:
...
...
@@ -226,7 +226,7 @@ def _safe_repr(object, context, maxlevels, level):
write
(
qget
(
char
,
`char`
[
1
:
-
1
]))
return
(
"
%
s
%
s
%
s"
%
(
closure
,
sio
.
getvalue
(),
closure
)),
True
,
False
if
issubclass
(
typ
,
dict
)
:
if
typ
is
dict
:
if
not
object
:
return
"{}"
,
True
,
False
objid
=
_id
(
object
)
...
...
@@ -251,8 +251,8 @@ def _safe_repr(object, context, maxlevels, level):
del
context
[
objid
]
return
"{
%
s}"
%
_commajoin
(
components
),
readable
,
recursive
if
issubclass
(
typ
,
list
)
or
issubclass
(
typ
,
tuple
)
:
if
issubclass
(
typ
,
list
)
:
if
typ
is
list
or
typ
is
tuple
:
if
typ
is
list
:
if
not
object
:
return
"[]"
,
True
,
False
format
=
"[
%
s]"
...
...
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