Commit 632e34ba authored by Jason Madden's avatar Jason Madden

Call __str__ more like the C version does; corrects test under Py3

parent d123b119
......@@ -472,8 +472,10 @@ class _Wrapper(ExtensionClass.Base):
def __str__(self):
aq_self = self._obj
f = getattr(type(aq_self), '__str__', object.__str__)
return _rebound_method(f, self)()
try:
return _rebound_method(aq_self.__str__, self)()
except (AttributeError,TypeError):
return object.__str__(self)
__binary_special_methods__ = [
# general numeric
......
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