Meador Inge <mead...@gmail.com> added the comment: I may be missing something subtle, but how can 'PyNumber_Index(v) != NULL' *and* '!PyInt_Check(v) && !PyLong_Check(v)' both be satisfied in the 'get_pylong' mods? It seems to me that 'PyNumber_Index' only returns non-NULL when the object being returned is an 'int' or 'long'.
Attached a patch with the extra check removed and a few more test cases. ---------- Added file: http://bugs.python.org/file16751/struct_index_trunk3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8300> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com