[pypy-svn] r17692 - pypy/dist/pypy/objspace/std
pedronis at codespeak.net
pedronis at codespeak.net
Tue Sep 20 15:38:55 CEST 2005
Author: pedronis
Date: Tue Sep 20 15:38:53 2005
New Revision: 17692
Modified:
pypy/dist/pypy/objspace/std/stringobject.py
Log:
the code in that form contained nested functions => not RPython, obscure crash in the annotatator
Modified: pypy/dist/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/stringobject.py (original)
+++ pypy/dist/pypy/objspace/std/stringobject.py Tue Sep 20 15:38:53 2005
@@ -62,17 +62,22 @@
else:
return ch
+_isspace = lambda c: c.isspace()
+_isdigit = lambda c: c.isdigit()
+_isalpha = lambda c: c.isalpha()
+_isalnum = lambda c: c.isalnum()
+
def str_isspace__String(space, w_self):
- return _is_generic(w_self, lambda c: c.isspace())
+ return _is_generic(w_self, _isspace)
def str_isdigit__String(space, w_self):
- return _is_generic(w_self, lambda c: c.isdigit())
+ return _is_generic(w_self, _isdigit)
def str_isalpha__String(space, w_self):
- return _is_generic(w_self, lambda c: c.isalpha())
+ return _is_generic(w_self, _isalpha)
def str_isalnum__String(space, w_self):
- return _is_generic(w_self, lambda c: c.isalnum())
+ return _is_generic(w_self, _isalnum)
def str_isupper__String(space, w_self):
"""Return True if all cased characters in S are uppercase and there is
More information about the Pypy-commit
mailing list