[pypy-svn] r40235 - pypy/dist/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Sun Mar 11 17:35:52 CET 2007
Author: arigo
Date: Sun Mar 11 17:35:51 2007
New Revision: 40235
Modified:
pypy/dist/pypy/objspace/std/stringtype.py
pypy/dist/pypy/objspace/std/unicodetype.py
Log:
Comments to clarify r40234.
Modified: pypy/dist/pypy/objspace/std/stringtype.py
==============================================================================
--- pypy/dist/pypy/objspace/std/stringtype.py (original)
+++ pypy/dist/pypy/objspace/std/stringtype.py Sun Mar 11 17:35:51 2007
@@ -263,6 +263,8 @@
# ____________________________________________________________
def descr__new__(space, w_stringtype, w_object=''):
+ # NB. the default value of w_object is really a *wrapped* empty string:
+ # there is gateway magic at work
from pypy.objspace.std.stringobject import W_StringObject
w_obj = space.str(w_object)
if space.is_w(w_stringtype, space.w_str):
Modified: pypy/dist/pypy/objspace/std/unicodetype.py
==============================================================================
--- pypy/dist/pypy/objspace/std/unicodetype.py (original)
+++ pypy/dist/pypy/objspace/std/unicodetype.py Sun Mar 11 17:35:51 2007
@@ -274,6 +274,8 @@
def descr__new__(space, w_unicodetype, w_string='', w_encoding=None, w_errors=None):
+ # NB. the default value of w_string is really a *wrapped* empty string:
+ # there is gateway magic at work
from pypy.objspace.std.unicodeobject import W_UnicodeObject
w_obj = w_string
w_obj_type = space.type(w_obj)
More information about the Pypy-commit
mailing list