Allow cdef class inheritance from builtin exception types
See original GitHub issueIn all supported CPython versions (Py2.6+), exceptions are implemented as builtin types. It would be nice to allow users to inherit from them in cdef classes, i.e. to directly support
cdef class MyException(Exception):
cdef int error_info
Migrated from http://trac.cython.org/ticket/862
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Extension types (aka. cdef classes) - Cython's Documentation
Cython requires to know the complete inheritance hierarchy in order to lay out their C structs, and restricts it to single inheritance.
Read more >Extension Types — Cython 0.21 documentation
You define an extension type using the cdef class statement. ... An extension type may inherit from a built-in type or another extension...
Read more >Extension Types
You define an extension type using the cdef class statement. ... An extension type may inherit from a built-in type or another extension...
Read more >Calling Cython from c++ with not built-in types - Stack Overflow
To create a Cython extension class from existing C++ pointer, use a factory function. For example: cdef class PyMyClass: cdef MyClass ...
Read more >Calling type to construct an object - Google Groups
a new instance of C. The solution is to have a metaclass inheriting from type ... ctypedef class __builtin__.type [object PyHeapTypeObject]: pass. cdef...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And fully fixed at b1d7b0de9e4cdc1eb866661e34f3da8892993fba.
Any reason that this was only done for
Exception
and not other classes likeValueError
?