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
0b7f7784
Kaydet (Commit)
0b7f7784
authored
May 06, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
PEP 8 nits in json package
üst
24237ea8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
__init__.py
Lib/json/tests/__init__.py
+0
-2
test_recursion.py
Lib/json/tests/test_recursion.py
+2
-0
tool.py
Lib/json/tool.py
+1
-0
No files found.
Lib/json/tests/__init__.py
Dosyayı görüntüle @
0b7f7784
...
@@ -31,7 +31,5 @@ def main():
...
@@ -31,7 +31,5 @@ def main():
runner
.
run
(
suite
)
runner
.
run
(
suite
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
import
os
import
sys
sys
.
path
.
insert
(
0
,
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))))
sys
.
path
.
insert
(
0
,
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))))
main
()
main
()
Lib/json/tests/test_recursion.py
Dosyayı görüntüle @
0b7f7784
...
@@ -5,6 +5,7 @@ import json
...
@@ -5,6 +5,7 @@ import json
class
JSONTestObject
:
class
JSONTestObject
:
pass
pass
class
RecursiveJSONEncoder
(
json
.
JSONEncoder
):
class
RecursiveJSONEncoder
(
json
.
JSONEncoder
):
recurse
=
False
recurse
=
False
def
default
(
self
,
o
):
def
default
(
self
,
o
):
...
@@ -15,6 +16,7 @@ class RecursiveJSONEncoder(json.JSONEncoder):
...
@@ -15,6 +16,7 @@ class RecursiveJSONEncoder(json.JSONEncoder):
return
'JSONTestObject'
return
'JSONTestObject'
return
json
.
JSONEncoder
.
default
(
o
)
return
json
.
JSONEncoder
.
default
(
o
)
class
TestRecursion
(
TestCase
):
class
TestRecursion
(
TestCase
):
def
test_listrecursion
(
self
):
def
test_listrecursion
(
self
):
x
=
[]
x
=
[]
...
...
Lib/json/tool.py
Dosyayı görüntüle @
0b7f7784
...
@@ -8,6 +8,7 @@ Usage::
...
@@ -8,6 +8,7 @@ Usage::
}
}
$ echo '{ 1.2:3.4}' | python -mjson.tool
$ echo '{ 1.2:3.4}' | python -mjson.tool
Expecting property name: line 1 column 2 (char 2)
Expecting property name: line 1 column 2 (char 2)
"""
"""
import
sys
import
sys
import
json
import
json
...
...
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