[issue11145] '%o' % user-defined instance

Francis MB report at bugs.python.org
Sat Oct 4 16:07:49 CEST 2014


Francis MB added the comment:

Just updating the type to 'behavior'.
 
I can still reproduce this issue:

$ python2.7
Python 2.7.8 (default, Sep  9 2014, 22:08:43) 
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class Y(long):
...   def __oct__(self):
...     return 'abc'
... 
>>> '%o' % Y()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: ../Objects/stringobject.c:4045: bad argument to internal function
>>>

----------
nosy: +francismb
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11145>
_______________________________________


More information about the Python-bugs-list mailing list