[pypy-svn] r46301 - pypy/dist/lib-python/modified-2.4.1

arigo at codespeak.net arigo at codespeak.net
Tue Sep 4 13:02:41 CEST 2007


Author: arigo
Date: Tue Sep  4 13:02:40 2007
New Revision: 46301

Modified:
   pypy/dist/lib-python/modified-2.4.1/pickle.py
Log:
Avoid importing 're' from 'pickle'.  This makes some tests
running on top of py.py incredibly faster.


Modified: pypy/dist/lib-python/modified-2.4.1/pickle.py
==============================================================================
--- pypy/dist/lib-python/modified-2.4.1/pickle.py	(original)
+++ pypy/dist/lib-python/modified-2.4.1/pickle.py	Tue Sep  4 13:02:40 2007
@@ -32,7 +32,6 @@
 import marshal
 import sys
 import struct
-import re
 import warnings
 
 __all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
@@ -163,7 +162,7 @@
 _tuplesize2code = [EMPTY_TUPLE, TUPLE1, TUPLE2, TUPLE3]
 
 
-__all__.extend([x for x in dir() if re.match("[A-Z][A-Z0-9_]+$",x)])
+__all__.extend([x for x in dir() if x[0].isalpha() and x == x.upper()])
 del x
 
 



More information about the Pypy-commit mailing list