[Python-Dev] Type of range object members

"Martin v. Löwis" martin at v.loewis.de
Tue Aug 15 17:58:24 CEST 2006


Alexander Belopolsky schrieb:
> Another reason is that POSIX interprets negative values of ssize_t as  
> "an error indication", not as an offset from the end. A better POSIX  
> analogy would be off_t (as used in lseek).

That's subtle. By this reasoning, ptrdiff_t would be wrong, as well,
since it really means "negative index", not "count from the end".

>> In the discussion, ptrdiff_t was never brought up as an alternative
> 
> Yes, it was, by you <http://mail.python.org/pipermail/python-dev/2006- 
> January/059562.html> :-).

Ah, that's why it isn't ptrdiff_t: Tim Peters said he liked ssize_t

> I was not suggesting Py_ptrdiff_t.  My suggestion was "Py_index_t",  
> but I am six month late :-(.

Indeed, it is too late for such a change.

Regards,
Martin


More information about the Python-Dev mailing list