Commit 592b2c1a authored by Kevin Modzelewski's avatar Kevin Modzelewski

str.__mod__ can return unicode apparently

parent 89e58ec0
......@@ -2254,7 +2254,7 @@ void setupStr() {
str_cls->giveAttr("format", new BoxedFunction(boxRTFunction((void*)strFormat, UNKNOWN, 1, 0, true, true)));
str_cls->giveAttr("__add__", new BoxedFunction(boxRTFunction((void*)strAdd, UNKNOWN, 2)));
str_cls->giveAttr("__mod__", new BoxedFunction(boxRTFunction((void*)strMod, STR, 2)));
str_cls->giveAttr("__mod__", new BoxedFunction(boxRTFunction((void*)strMod, UNKNOWN, 2)));
str_cls->giveAttr("__mul__", new BoxedFunction(boxRTFunction((void*)strMul, UNKNOWN, 2)));
// TODO not sure if this is right in all cases:
str_cls->giveAttr("__rmul__", new BoxedFunction(boxRTFunction((void*)strMul, UNKNOWN, 2)));
......
......@@ -136,4 +136,3 @@ try:
print "hello world".index("goodbye")
except:
print "threw exception"
......@@ -79,3 +79,5 @@ def f(a):
f(a=1)
f(**{'a':2})
f(**{u'a':3})
print repr('%s' % u'') # this gives a unicode object!
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment