[Python-checkins] r61317 - python/trunk/Tools/pybench/pybench.py
jeffrey.yasskin
python-checkins at python.org
Sat Mar 8 22:35:16 CET 2008
Author: jeffrey.yasskin
Date: Sat Mar 8 22:35:15 2008
New Revision: 61317
Modified:
python/trunk/Tools/pybench/pybench.py
Log:
Well that was dumb. platform.python_implementation returns a function, not a
string.
Modified: python/trunk/Tools/pybench/pybench.py
==============================================================================
--- python/trunk/Tools/pybench/pybench.py (original)
+++ python/trunk/Tools/pybench/pybench.py Sat Mar 8 22:35:15 2008
@@ -121,7 +121,8 @@
'platform': platform.platform(),
'processor': platform.processor(),
'executable': sys.executable,
- 'implementation': getattr(platform, 'python_implementation', 'n/a'),
+ 'implementation': getattr(platform, 'python_implementation',
+ lambda:'n/a')(),
'python': platform.python_version(),
'compiler': platform.python_compiler(),
'buildno': buildno,
@@ -837,7 +838,7 @@
print 'PYBENCH %s' % __version__
print '-' * LINE
print '* using %s %s' % (
- getattr(platform, 'python_implementation', 'Python'),
+ getattr(platform, 'python_implementation', lambda:'Python')(),
string.join(string.split(sys.version), ' '))
# Switch off garbage collection
More information about the Python-checkins
mailing list