> Any thoughts? These should be fixed on a case-by-case basis. Please submit patches to SF, and assign them to me. Changes should only go into 2.6.
As a principle, values that could exceed 2Gi in a hand-crafted Python program should be Py_ssize_t. Values that can never exceed the int range (because of other constraints, such as limitations of the byte code) should be safe-downcast to int (or smaller). In the particular case of PyEval_EvalCodeEx, I think most values can't grow beyond 2**31 because the byte code format wouldn't allow such indexes. There should be documentation on what the valid ranges are for argcount, kwcount, locals, and what the rationale for these limitations are, and then they should get a consistent datatype. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com