Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
21beb4c2
Commit
21beb4c2
authored
Mar 25, 2004
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a caching bug in platform.platform() where the argument of 'terse' was
not taken into consideration when caching value.
parent
504ca68e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
Lib/platform.py
Lib/platform.py
+8
-8
Misc/NEWS
Misc/NEWS
+4
-1
No files found.
Lib/platform.py
View file @
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
View file @
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