[pypy-issue] [issue1454] ctypes: __int__ not called for ctype subclass

Amaury Forgeot d Arc tracker at bugs.pypy.org
Tue Apr 16 00:00:22 CEST 2013

Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

It's somehow related to the __buffer__ method:

class Foo(object):
    def __int__(self):
        return 42
    def __buffer__(self):
        return buffer("12.34")

Fails with ValueError: invalid literal for int() with base 10: '12.34'

...in CPython, string and buffers are processed after __int__; pypy should do the same.


nosy: +amaury
status: unread -> chatting

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list