On Sat, Jul 19, 2008 at 8:51 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> Now I see another issue: I just changed "PyInt_*" in my code to >> "PyLong_*" (since PyInt_* functions don't exist in Python 3.0). But >> since an integer fails "PyLong_Check()" in Python 2.*, how can I check >> for integers portably between Python 2.[3-6] and Python 3.0?. I would >> like to avoid conditional compilation, if possible. >> >>> I think PyNumber_Check should do the trick. > > PyNumber_Check also succeeds for floats, right? so it shouldn't be > use when checking for integers is desired.
I believe he wants PyIndex_Check then. > > Regards, > Martin > -- Cheers, Benjamin Peterson "There's no place like 127.0.0.1." _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com