[Python-Dev] Type of range object members

Guido van Rossum guido at python.org
Tue Aug 15 01:32:26 CEST 2006


Methinks that as long as PyIntObject uses long (see intobject.h)
there's no point in changing this to long.

--Guido

On 8/14/06, Alexander Belopolsky <alexander.belopolsky at gmail.com> wrote:
> The range object is currently defined in Objects/rangeobject.c as
>
> typedef struct {
>         PyObject_HEAD
>         long    start;
>         long    step;
>         long    len;
> } rangeobject;
>
> Is this consistent with PEP 353, or should Py_ssize_t be used instead of long?
>
> It looks like some of the code in rangeobject.c is already Py_ssize_t
> aware (see range_item and range_length), but it assumes that it is
> safe to cast long to ssize_t and back.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list