Ticket #166 (closed defect: fixed)
cdef'd list raises wrong exception on append when list is None
| Reported by: | hoytak | Owned by: | scoder |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.12 |
| Component: | Code Generation | Keywords: | |
| Cc: |
Description
Hello,
In cython-devel version 1497, I think a check for None is not being inserted for list.append(). The following code
def crash():
cdef list l = None
l.append(2)
raise the following exception:
In [4]: list_as_none.crash()
---------------------------------------------------------------------------
SystemError Traceback (most recent call last)
/home/hoytak/workspace/cython-tests/list_as_none/<ipython console> in <module>()
/home/hoytak/workspace/cython-tests/list_as_none/list_as_none.so in list_as_none.crash (list_as_none.c:219)()
1 def crash():
2 cdef list l = None
3
----> 4 l.append(2)
SystemError: Objects/listobject.c:255: bad argument to internal function
I believe this should be something indicating that l is None.
Change History
Note: See
TracTickets for help on using
tickets.
