Please give the poor function a break. It was added to 2.5 and used only for indexing there. In 3.0 it is more generally useful (I want to use it whenever an int is needed). but in our pre-alpha code the error messages haven't been fixed yet. That's the whole story.
On 2/25/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > > I find it important to use that API since anything that wants to > > behave like a (small) int should be acceptable. > > But by calling __index__ and giving error messages about > indexes, PyInt_AsSsize_t seems to be assuming that the > value is going to be used as an index. > > If that's the true purpose of PyInt_AsSsize_t, then it > shouldn't be getting called in this situation. > > If it's not, then it shouldn't be giving error messages > that talk about indexes, and there should be another > API such as PyObject_AsIndex for values that really > are going to be used as indexes. > > -- > Greg > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
