Ticket #236 (closed enhancement: fixed)
Python methods on corresponding C types (float/int)
| Reported by: | scoder | Owned by: | scoder |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.12.1 |
| Component: | Pure Python Mode | Keywords: | |
| Cc: |
Description
It would be nice if Cython could emulate the instance methods of Python types on the corresponding C types (such as int or float). That way, you could say
cdef float f = 0.5
print f.is_integer()
This would not necessarily be efficiently implemented as plain C code (especially when there is no trivial implementation or corresponding C-API call). It's only meant to make C types a bit simpler to use from a Python POV.
Change History
Note: See
TracTickets for help on using
tickets.
