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
80530ce8
Kaydet (Commit)
80530ce8
authored
Ock 21, 1993
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* Add some more tests for numbers
* mainloop.py: don't use select unless absolutely necessary (for Mac)
üst
9672e448
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
10 deletions
+44
-10
mainloop.py
Lib/lib-stdwin/mainloop.py
+10
-5
mainloop.py
Lib/stdwin/mainloop.py
+10
-5
test_types.py
Lib/test/test_types.py
+21
-0
testall.out
Lib/test/testall.out
+3
-0
No files found.
Lib/lib-stdwin/mainloop.py
Dosyayı görüntüle @
80530ce8
...
...
@@ -4,9 +4,6 @@
# - have a 'dispatch' function as a window member
# XXX This is UNIX specific! For the Mac we need to use a simpler version!
import
stdwin
,
stdwinq
from
stdwinevents
import
*
...
...
@@ -132,9 +129,17 @@ def mainloop():
recursion_level
=
recursion_level
+
1
try
:
stdwin_select_handler
()
# Process events already in queue
fd
=
stdwin
.
fileno
()
while
1
:
if
windows
:
if
windows
and
not
fdlist
:
while
windows
and
not
fdlist
:
try
:
event
=
stdwinq
.
getevent
()
except
KeyboardInterrupt
:
event
=
(
WE_COMMAND
,
\
None
,
WC_CANCEL
)
dispatch
(
event
)
elif
windows
and
fdlist
:
fd
=
stdwin
.
fileno
()
if
recursion_level
==
1
:
registerfd
(
fd
,
'r'
,
stdwin_select_handler
)
try
:
...
...
Lib/stdwin/mainloop.py
Dosyayı görüntüle @
80530ce8
...
...
@@ -4,9 +4,6 @@
# - have a 'dispatch' function as a window member
# XXX This is UNIX specific! For the Mac we need to use a simpler version!
import
stdwin
,
stdwinq
from
stdwinevents
import
*
...
...
@@ -132,9 +129,17 @@ def mainloop():
recursion_level
=
recursion_level
+
1
try
:
stdwin_select_handler
()
# Process events already in queue
fd
=
stdwin
.
fileno
()
while
1
:
if
windows
:
if
windows
and
not
fdlist
:
while
windows
and
not
fdlist
:
try
:
event
=
stdwinq
.
getevent
()
except
KeyboardInterrupt
:
event
=
(
WE_COMMAND
,
\
None
,
WC_CANCEL
)
dispatch
(
event
)
elif
windows
and
fdlist
:
fd
=
stdwin
.
fileno
()
if
recursion_level
==
1
:
registerfd
(
fd
,
'r'
,
stdwin_select_handler
)
try
:
...
...
Lib/test/test_types.py
Dosyayı görüntüle @
80530ce8
...
...
@@ -60,6 +60,27 @@ if long(1.9) == 1L == long(1.1) and long(-1.1) == -1L == long(-1.9): pass
else
:
raise
TestFailed
,
'long() does not round properly'
if
float
(
1
)
==
1.0
and
float
(
-
1
)
==
-
1.0
and
float
(
0
)
==
0.0
:
pass
else
:
raise
TestFailed
,
'float() does not work properly'
print
'6.4.1 32-bit integers'
if
12
+
24
<>
36
:
raise
TestFailed
,
'int op'
if
12
+
(
-
24
)
<>
-
12
:
raise
TestFailed
,
'int op'
if
(
-
12
)
+
24
<>
12
:
raise
TestFailed
,
'int op'
if
(
-
12
)
+
(
-
24
)
<>
-
36
:
raise
TestFailed
,
'int op'
if
not
12
<
24
:
raise
TestFailed
,
'int op'
if
not
-
24
<
-
12
:
raise
TestFailed
,
'int op'
print
'6.4.2 Long integers'
if
12L
+
24L
<>
36L
:
raise
TestFailed
,
'long op'
if
12L
+
(
-
24L
)
<>
-
12L
:
raise
TestFailed
,
'long op'
if
(
-
12L
)
+
24L
<>
12L
:
raise
TestFailed
,
'long op'
if
(
-
12L
)
+
(
-
24L
)
<>
-
36L
:
raise
TestFailed
,
'long op'
if
not
12L
<
24L
:
raise
TestFailed
,
'long op'
if
not
-
24L
<
-
12L
:
raise
TestFailed
,
'long op'
print
'6.4.3 Floating point numbers'
if
12.0
+
24.0
<>
36.0
:
raise
TestFailed
,
'float op'
if
12.0
+
(
-
24.0
)
<>
-
12.0
:
raise
TestFailed
,
'float op'
if
(
-
12.0
)
+
24.0
<>
12.0
:
raise
TestFailed
,
'float op'
if
(
-
12.0
)
+
(
-
24.0
)
<>
-
36.0
:
raise
TestFailed
,
'float op'
if
not
12.0
<
24.0
:
raise
TestFailed
,
'float op'
if
not
-
24.0
<
-
12.0
:
raise
TestFailed
,
'float op'
print
'6.5 Sequence types'
...
...
Lib/test/testall.out
Dosyayı görüntüle @
80530ce8
...
...
@@ -124,6 +124,9 @@ test_types
6.2 Boolean operations
6.3 Comparisons
6.4 Numeric types (mostly conversions)
6.4.1 32-bit integers
6.4.2 Long integers
6.4.3 Floating point numbers
6.5 Sequence types
6.5.1 Strings
6.5.2 Tuples
...
...
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