FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Well that was dumb. platform.python_implementation returns a function… · java66liu/python@12ef0fa · GitHub

forked from glix/python

Commit 12ef0fa

Browse files
jeffrey.yasskin
committed
Well that was dumb. platform.python_implementation returns a function, not a
string. git-svn-id: http://svn.python.org/projects/python/trunk@61317 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 0f61c43 commit 12ef0fa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎Tools/pybench/pybench.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ def get_machine_details():
121121
'platform': platform.platform(),
122122
'processor': platform.processor(),
123123
'executable': sys.executable,
124-
'implementation': getattr(platform, 'python_implementation', 'n/a'),
124+
'implementation': getattr(platform, 'python_implementation',
125+
lambda:'n/a')(),
125126
'python': platform.python_version(),
126127
'compiler': platform.python_compiler(),
127128
'buildno': buildno,
@@ -837,7 +838,7 @@ def main(self):
837838
print 'PYBENCH %s' % __version__
838839
print '-' * LINE
839840
print '* using %s %s' % (
840-
getattr(platform, 'python_implementation', 'Python'),
841+
getattr(platform, 'python_implementation', lambda:'Python')(),
841842
string.join(string.split(sys.version), ' '))
842843

843844
# Switch off garbage collection

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL