> 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. Regards, Martin _______________________________________________ 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