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
21beb4c2
Kaydet (Commit)
21beb4c2
authored
Mar 25, 2004
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed a caching bug in platform.platform() where the argument of 'terse' was
not taken into consideration when caching value.
üst
504ca68e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
platform.py
Lib/platform.py
+8
-8
NEWS
Misc/NEWS
+4
-1
No files found.
Lib/platform.py
Dosyayı görüntüle @
21beb4c2
...
...
@@ -1135,8 +1135,8 @@ def python_compiler():
### The Opus Magnum of platform strings :-)
_platform_cache
=
None
_platform_aliased_cache
=
None
_platform_cache
=
{
True
:
None
,
False
:
None
}
_platform_aliased_cache
=
{
True
:
None
,
False
:
None
}
def
platform
(
aliased
=
0
,
terse
=
0
):
...
...
@@ -1159,10 +1159,10 @@ def platform(aliased=0, terse=0):
"""
global
_platform_cache
,
_platform_aliased_cache
if
not
aliased
and
(
_platform_cache
is
not
None
):
return
_platform_cache
elif
_platform_aliased_cache
is
not
None
:
return
_platform_aliased_cache
if
not
aliased
and
(
_platform_cache
[
bool
(
terse
)]
is
not
None
):
return
_platform_cache
[
bool
(
terse
)]
elif
_platform_aliased_cache
[
bool
(
terse
)]
is
not
None
:
return
_platform_aliased_cache
[
bool
(
terse
)]
# Get uname information and then apply platform specific cosmetics
# to it...
...
...
@@ -1219,11 +1219,11 @@ def platform(aliased=0, terse=0):
platform
=
_platform
(
system
,
release
,
machine
,
processor
,
bits
,
linkage
)
if
aliased
:
_platform_aliased_cache
=
platform
_platform_aliased_cache
[
bool
(
terse
)]
=
platform
elif
terse
:
pass
else
:
_platform_cache
=
platform
_platform_cache
[
bool
(
terse
)]
=
platform
return
platform
### Command line interface
...
...
Misc/NEWS
Dosyayı görüntüle @
21beb4c2
...
...
@@ -283,7 +283,7 @@ Extension modules
into groups sharing the same key (as determined by a key function).
It offers some of functionality of SQL'
s
groupby
keyword
and
of
the
Unix
uniq
filter
.
-
itertools
now
has
a
new
function
,
tee
()
which
produces
two
independent
iterators
from
a
single
iterable
.
...
...
@@ -296,6 +296,9 @@ Extension modules
Library
-------
-
Fixed
a
caching
bug
in
platform
.
platform
()
where
the
argument
of
'terse'
was
not
taken
into
consideration
when
caching
value
.
-
Added
two
new
command
-
line
arguments
for
profile
(
output
file
and
default
sort
).
...
...
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