[pypy-commit] pypy default: We don't need to support Python 2.4 any more
rlamy
noreply at buildbot.pypy.org
Sun Oct 5 03:51:01 CEST 2014
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r73777:55efd716d985
Date: 2014-10-05 02:50 +0100
http://bitbucket.org/pypy/pypy/changeset/55efd716d985/
Log: We don't need to support Python 2.4 any more
diff --git a/rpython/tool/uid.py b/rpython/tool/uid.py
--- a/rpython/tool/uid.py
+++ b/rpython/tool/uid.py
@@ -1,4 +1,4 @@
-import struct, sys
+import struct
HUGEVAL_BYTES = struct.calcsize('P')
HUGEVAL = 256 ** HUGEVAL_BYTES
@@ -9,15 +9,7 @@
result += HUGEVAL
return result
-if sys.version_info < (2, 5):
- def uid(obj):
- """
- Return the id of an object as an unsigned number so that its hex
- representation makes sense
- """
- return fixid(id(obj))
-else:
- uid = id # guaranteed to be positive from CPython 2.5 onwards
+uid = id # guaranteed to be positive from CPython 2.5 onwards
class Hashable(object):
More information about the pypy-commit
mailing list