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

Christoph Reiter tracker at bugs.pypy.org
Mon Apr 15 19:17:08 CEST 2013

New submission from Christoph Reiter <reiter.christoph at gmail.com>:

>>>> from ctypes import c_uint
>>>> class Foo(c_uint):
....     def __int__(self):
....         return 42
>>>> int(Foo())
ValueError: invalid literal for int() with base 10: ''

maybe related:

int(c_uint()) also fails with the same error

messages: 5581
nosy: lazka, pypy-issue
priority: bug
status: unread
title: ctypes: __int__ not called for ctype subclass

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

More information about the pypy-issue mailing list