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
c9a5a0e1
Kaydet (Commit)
c9a5a0e1
authored
Eyl 01, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#6814: remove traces of xrange().
üst
a4c05a26
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
11 deletions
+8
-11
mp_pool.py
Doc/includes/mp_pool.py
+3
-3
os.rst
Doc/library/os.rst
+1
-1
listsort.txt
Objects/listsort.txt
+1
-1
rangeobject.c
Objects/rangeobject.c
+1
-1
README
Tools/pybench/README
+2
-5
No files found.
Doc/includes/mp_pool.py
Dosyayı görüntüle @
c9a5a0e1
...
...
@@ -98,17 +98,17 @@ def test():
t
=
time
.
time
()
A
=
list
(
map
(
pow3
,
range
(
N
)))
print
(
'
\t
map(pow3,
x
range(
%
d)):
\n\t\t
%
s seconds'
%
\
print
(
'
\t
map(pow3, range(
%
d)):
\n\t\t
%
s seconds'
%
\
(
N
,
time
.
time
()
-
t
))
t
=
time
.
time
()
B
=
pool
.
map
(
pow3
,
range
(
N
))
print
(
'
\t
pool.map(pow3,
x
range(
%
d)):
\n\t\t
%
s seconds'
%
\
print
(
'
\t
pool.map(pow3, range(
%
d)):
\n\t\t
%
s seconds'
%
\
(
N
,
time
.
time
()
-
t
))
t
=
time
.
time
()
C
=
list
(
pool
.
imap
(
pow3
,
range
(
N
),
chunksize
=
N
//
8
))
print
(
'
\t
list(pool.imap(pow3,
x
range(
%
d), chunksize=
%
d)):
\n\t\t
%
s'
\
print
(
'
\t
list(pool.imap(pow3, range(
%
d), chunksize=
%
d)):
\n\t\t
%
s'
\
' seconds'
%
(
N
,
N
//
8
,
time
.
time
()
-
t
))
assert
A
==
B
==
C
,
(
len
(
A
),
len
(
B
),
len
(
C
))
...
...
Doc/library/os.rst
Dosyayı görüntüle @
c9a5a0e1
...
...
@@ -396,7 +396,7 @@ by file descriptors.
Close all file descriptors from *fd_low* (inclusive) to *fd_high* (exclusive),
ignoring errors. Availability: Unix, Windows. Equivalent to::
for fd in
x
range(fd_low, fd_high):
for fd in range(fd_low, fd_high):
try:
os.close(fd)
except OSError:
...
...
Objects/listsort.txt
Dosyayı görüntüle @
c9a5a0e1
...
...
@@ -606,7 +606,7 @@ from time import clock as now
def fill(n):
from random import random
return [random() for i in
x
range(n)]
return [random() for i in range(n)]
def mycmp(x, y):
global ncmp
...
...
Objects/rangeobject.c
Dosyayı görüntüle @
c9a5a0e1
...
...
@@ -431,7 +431,7 @@ PyTypeObject PyRangeIter_Type = {
rangeiter_new
,
/* tp_new */
};
/* Return number of items in range
/xrange
(lo, hi, step). step > 0
/* Return number of items in range (lo, hi, step). step > 0
* required. Return a value < 0 if & only if the true value is too
* large to fit in a signed long.
*/
...
...
Tools/pybench/README
Dosyayı görüntüle @
c9a5a0e1
...
...
@@ -260,10 +260,7 @@ class IntegerCounting(Test):
# Run test rounds
#
# NOTE: Use xrange() for all test loops unless you want to face
# a 20MB process !
#
for i in xrange(self.rounds):
for i in range(self.rounds):
# Repeat the operations per round to raise the run-time
# per operation significantly above the noise level of the
...
...
@@ -305,7 +302,7 @@ class IntegerCounting(Test):
a = 1
# Run test rounds (without actually doing any operation)
for i in
x
range(self.rounds):
for i in range(self.rounds):
# Skip the actual execution of the operations, since we
# only want to measure the test's administration overhead.
...
...
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