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
247763d6
Kaydet (Commit)
247763d6
authored
Nis 12, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #26733: Fixed formatting line numbers in test_dis.
Based on patch by Xiang Zhang.
üst
de886d92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
test_dis.py
Lib/test/test_dis.py
+11
-11
No files found.
Lib/test/test_dis.py
Dosyayı görüntüle @
247763d6
...
...
@@ -31,7 +31,7 @@ class _C:
self
.
x
=
x
==
1
dis_c_instance_method
=
"""
\
%-4
d
0 LOAD_FAST 1 (x)
%3
d
0 LOAD_FAST 1 (x)
3 LOAD_CONST 1 (1)
6 COMPARE_OP 2 (==)
9 LOAD_FAST 0 (self)
...
...
@@ -55,12 +55,12 @@ def _f(a):
return
1
dis_f
=
"""
\
%-4
d
0 LOAD_GLOBAL 0 (print)
%3
d
0 LOAD_GLOBAL 0 (print)
3 LOAD_FAST 0 (a)
6 CALL_FUNCTION 1 (1 positional, 0 keyword pair)
9 POP_TOP
%-4
d
10 LOAD_CONST 1 (1)
%3
d
10 LOAD_CONST 1 (1)
13 RETURN_VALUE
"""
%
(
_f
.
__code__
.
co_firstlineno
+
1
,
_f
.
__code__
.
co_firstlineno
+
2
)
...
...
@@ -82,17 +82,17 @@ def bug708901():
pass
dis_bug708901
=
"""
\
%-4
d
0 SETUP_LOOP 23 (to 26)
%3
d
0 SETUP_LOOP 23 (to 26)
3 LOAD_GLOBAL 0 (range)
6 LOAD_CONST 1 (1)
%-4
d
9 LOAD_CONST 2 (10)
%3
d
9 LOAD_CONST 2 (10)
12 CALL_FUNCTION 2 (2 positional, 0 keyword pair)
15 GET_ITER
>> 16 FOR_ITER 6 (to 25)
19 STORE_FAST 0 (res)
%-4
d
22 JUMP_ABSOLUTE 16
%3
d
22 JUMP_ABSOLUTE 16
>> 25 POP_BLOCK
>> 26 LOAD_CONST 0 (None)
29 RETURN_VALUE
...
...
@@ -191,16 +191,16 @@ dis_compound_stmt_str = """\
"""
dis_traceback
=
"""
\
%-4
d
0 SETUP_EXCEPT 12 (to 15)
%3
d
0 SETUP_EXCEPT 12 (to 15)
%-4
d
3 LOAD_CONST 1 (1)
%3
d
3 LOAD_CONST 1 (1)
6 LOAD_CONST 2 (0)
--> 9 BINARY_TRUE_DIVIDE
10 POP_TOP
11 POP_BLOCK
12 JUMP_FORWARD 46 (to 61)
%-4
d
>> 15 DUP_TOP
%3
d
>> 15 DUP_TOP
16 LOAD_GLOBAL 0 (Exception)
19 COMPARE_OP 10 (exception match)
22 POP_JUMP_IF_FALSE 60
...
...
@@ -209,7 +209,7 @@ dis_traceback = """\
29 POP_TOP
30 SETUP_FINALLY 14 (to 47)
%-4
d
33 LOAD_FAST 0 (e)
%3
d
33 LOAD_FAST 0 (e)
36 LOAD_ATTR 1 (__traceback__)
39 STORE_FAST 1 (tb)
42 POP_BLOCK
...
...
@@ -222,7 +222,7 @@ dis_traceback = """\
57 JUMP_FORWARD 1 (to 61)
>> 60 END_FINALLY
%-4
d
>> 61 LOAD_FAST 1 (tb)
%3
d
>> 61 LOAD_FAST 1 (tb)
64 RETURN_VALUE
"""
%
(
TRACEBACK_CODE
.
co_firstlineno
+
1
,
TRACEBACK_CODE
.
co_firstlineno
+
2
,
...
...
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