Alex Gaynor added the comment: In my opinion that should use PyLong_CheckExact ---------- nosy: +alex _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue17576> _______________________________________