diff options
| author | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2011-10-10 23:57:42 -0400 |
|---|---|---|
| committer | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2011-10-10 23:59:37 -0400 |
| commit | 25a055334e5cd9d22777864d2a5c0fd8a88bbcff (patch) | |
| tree | 3a10293a8328eae8b48771cbb4f1e259b337b152 /lib/Crypto/SelfTest/Hash | |
| parent | 7401e648d44f9324a313346f45e86fc5e779a7aa (diff) | |
| download | pycrypto-25a055334e5cd9d22777864d2a5c0fd8a88bbcff.tar.gz | |
Don't abuse __builtins__
According to Jean-Paul Calderone at https://bugs.launchpad.net/pycrypto/+bug/785150:
`__builtins__` is an implementation detail of CPython. It takes on
inconsistent values at various times. The use in `common.py` happens to
work on recent version of CPython, but it doesn't work on PyPy. The only
thing you should ever do, when you're doing this sort of thing, is "import
__builtin__; __builtin__.foo".
Diffstat (limited to 'lib/Crypto/SelfTest/Hash')
| -rw-r--r-- | lib/Crypto/SelfTest/Hash/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Crypto/SelfTest/Hash/common.py b/lib/Crypto/SelfTest/Hash/common.py index ee3eb07..386a82e 100644 --- a/lib/Crypto/SelfTest/Hash/common.py +++ b/lib/Crypto/SelfTest/Hash/common.py @@ -38,7 +38,7 @@ if sys.hexversion < 0x02030000: def dict(**kwargs): return kwargs.copy() else: - dict = __builtins__['dict'] + dict = dict class HashSelfTest(unittest.TestCase): |
