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
dd8cb446
Kaydet (Commit)
dd8cb446
authored
Ara 29, 1993
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some minute changes.
üst
424e4da9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
14 deletions
+42
-14
Queue.py
Lib/Queue.py
+1
-0
calendar.py
Lib/calendar.py
+0
-1
os.py
Lib/os.py
+20
-10
test_grammar.py
Lib/test/test_grammar.py
+21
-3
No files found.
Lib/Queue.py
Dosyayı görüntüle @
dd8cb446
...
@@ -7,6 +7,7 @@ class Queue:
...
@@ -7,6 +7,7 @@ class Queue:
# Initialize a queue object with a given maximum size
# Initialize a queue object with a given maximum size
# (If maxsize is <= 0, the maximum size is infinite)
# (If maxsize is <= 0, the maximum size is infinite)
def
__init__
(
self
,
maxsize
):
def
__init__
(
self
,
maxsize
):
import
thread
self
.
_init
(
maxsize
)
self
.
_init
(
maxsize
)
self
.
mutex
=
thread
.
allocate_lock
()
self
.
mutex
=
thread
.
allocate_lock
()
self
.
esema
=
thread
.
allocate_lock
()
self
.
esema
=
thread
.
allocate_lock
()
...
...
Lib/calendar.py
Dosyayı görüntüle @
dd8cb446
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
# Import functions and variables from time module
# Import functions and variables from time module
from
time
import
gmtime
,
localtime
,
mktime
,
asctime
,
ctime
from
time
import
gmtime
,
localtime
,
mktime
,
asctime
,
ctime
from
time
import
timezone
,
altzone
,
daylight
,
tzname
# Exception raised for bad input (with string parameter for details)
# Exception raised for bad input (with string parameter for details)
error
=
'calendar.error'
error
=
'calendar.error'
...
...
Lib/os.py
Dosyayı görüntüle @
dd8cb446
# os.py -- either mac or posix depending on what system we're on.
# os.py -- either mac
, dos
or posix depending on what system we're on.
# This exports:
# This exports:
# - all functions from either posix or mac, e.g., os.unlink, os.stat, etc.
# - all functions from either posix or mac, e.g., os.unlink, os.stat, etc.
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# and opendir), and leave all pathname manipulation to os.path
# and opendir), and leave all pathname manipulation to os.path
# (e.g., split and join).
# (e.g., split and join).
# XXX This
will need to distinguish between real posix and MS-DOS emulation
# XXX This
is incorrect if the import *path fails...
try
:
try
:
from
posix
import
*
from
posix
import
*
...
@@ -30,14 +30,24 @@ try:
...
@@ -30,14 +30,24 @@ try:
path
=
posixpath
path
=
posixpath
del
posixpath
del
posixpath
except
ImportError
:
except
ImportError
:
from
mac
import
*
try
:
name
=
'mac'
from
mac
import
*
curdir
=
':'
name
=
'mac'
pardir
=
'::'
curdir
=
':'
sep
=
':'
pardir
=
'::'
import
macpath
sep
=
':'
path
=
macpath
import
macpath
del
macpath
path
=
macpath
del
macpath
except
ImportError
:
from
dos
import
*
name
=
'dos'
curdir
=
'.'
# XXX doesn't always work
pardir
=
'..'
# XXX doesn't always work
sep
=
'/'
# XXX or '\\' ???
import
dospath
path
=
dospath
del
dospath
def
execl
(
file
,
*
args
):
def
execl
(
file
,
*
args
):
execv
(
file
,
args
)
execv
(
file
,
args
)
...
...
Lib/test/test_grammar.py
Dosyayı görüntüle @
dd8cb446
...
@@ -23,9 +23,12 @@ print '1.1.2 Numeric literals'
...
@@ -23,9 +23,12 @@ print '1.1.2 Numeric literals'
print
'1.1.2.1 Plain integers'
print
'1.1.2.1 Plain integers'
if
0xff
<>
255
:
raise
TestFailed
,
'hex int'
if
0xff
<>
255
:
raise
TestFailed
,
'hex int'
if
0377
<>
255
:
raise
TestFailed
,
'octal int'
if
0377
<>
255
:
raise
TestFailed
,
'octal int'
if
2147483647
!=
017777777777
:
raise
TestFailed
,
'max positive int'
if
2147483647
!=
017777777777
:
raise
TestFailed
,
'large positive int'
# Change the following line to "if 0:" if you have 64-bit integers
try
:
if
1
:
from
sys
import
maxint
except
ImportError
:
maxint
=
2147483647
if
maxint
==
2147483647
:
if
-
2147483647
-
1
!=
020000000000
:
raise
TestFailed
,
'max negative int'
if
-
2147483647
-
1
!=
020000000000
:
raise
TestFailed
,
'max negative int'
# XXX -2147483648
# XXX -2147483648
if
037777777777
!=
-
1
:
raise
TestFailed
,
'oct -1'
if
037777777777
!=
-
1
:
raise
TestFailed
,
'oct -1'
...
@@ -37,6 +40,21 @@ if 1:
...
@@ -37,6 +40,21 @@ if 1:
continue
continue
raise
TestFailed
,
\
raise
TestFailed
,
\
'No OverflowError on huge integer literal '
+
`s`
'No OverflowError on huge integer literal '
+
`s`
elif
eval
(
'maxint == 9223372036854775807'
):
if
eval
(
'9223372036854775807-1 != -01000000000000000000000'
):
raise
TestFailed
,
'max negative int'
if
eval
(
'01777777777777777777777'
)
!=
-
1
:
raise
TestFailed
,
'oct -1'
if
eval
(
'0xffffffffffffffff'
)
!=
-
1
:
raise
TestFailed
,
'hex -1'
for
s
in
'9223372036854775808'
,
'02000000000000000000000'
,
\
'0x10000000000000000'
:
try
:
x
=
eval
(
s
)
except
OverflowError
:
continue
raise
TestFailed
,
\
'No OverflowError on huge integer literal '
+
`s`
else
:
print
'Weird maxint value'
,
maxint
print
'1.1.2.2 Long integers'
print
'1.1.2.2 Long integers'
x
=
0L
x
=
0L
...
...
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