Serhiy Storchaka added the comment: There is also similar issue in timedelta.__divmod__.
PyLong_Type.tp_as_number->nb_divmod() works only with integers. The different way of solving this issue is used in microseconds_to_delta_ex() in _datetimemodule.c. Perhaps the best solution is to add a check that the result of nb_divmod() is a 2-tuple in PyNumber_Divmod(). This could fix similar errors in third-party code. What is your thoughts Mark? ---------- nosy: +mark.dickinson, serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31577> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com