On the implicit cast - the 1 sentence synopsis: Should be fine for CPython >= 2.5, otherwise I'm dubious. The details: I did a google search on Py_ssize_t [1], and the first two hits are relevant: