[pypy-svn] r38646 - pypy/dist/pypy/module/__builtin__
arigo at codespeak.net
arigo at codespeak.net
Mon Feb 12 22:54:57 CET 2007
Author: arigo
Date: Mon Feb 12 22:54:56 2007
New Revision: 38646
Modified:
pypy/dist/pypy/module/__builtin__/operation.py
Log:
Oups, wrong check. It was unwrapping and re-wrapping all strings.
Modified: pypy/dist/pypy/module/__builtin__/operation.py
==============================================================================
--- pypy/dist/pypy/module/__builtin__/operation.py (original)
+++ pypy/dist/pypy/module/__builtin__/operation.py Mon Feb 12 22:54:56 2007
@@ -32,9 +32,9 @@
# space.{get,set,del}attr()...
# Note that if w_name is already a string (or a subclass of str),
# it must be returned unmodified (and not e.g. unwrapped-rewrapped).
- name = space.str_w(w_name) # typecheck
- if not space.is_true(space.isinstance(w_name, space.w_type)):
- w_name = space.wrap(name) # typically, w_name was a unicode string
+ if not space.is_true(space.isinstance(w_name, space.w_str)):
+ name = space.str_w(w_name) # typecheck
+ w_name = space.wrap(name) # rewrap as a real string
return w_name
def delattr(space, w_object, w_name):
More information about the Pypy-commit
mailing list