[issue19049] itertools.tee isn't 64-bit compliant

2013-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We gain stability. I doubt we should change this. However in any case you forgot about tee_reduce(). -- ___ Python tracker ___ _

[issue19049] itertools.tee isn't 64-bit compliant

2013-09-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I doubt we should change this. Currently itertools.tee() will break if more than 2**31 elements are saved in the inner structures. I certainly think it should be fixed, rather than bite someone by surprise one day. > However in any case you forgot about tee_r

[issue19049] itertools.tee isn't 64-bit compliant

2013-09-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't think we need Py_ssize_t for integers from 0 to 57. IMO it's better to use Py_ssize_t there, since it can get combined with other Py_ssize_t values. Avoiding spurious conversions eliminates a common source of errors. We don't gain anything by keeping i

[issue19049] itertools.tee isn't 64-bit compliant

2013-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think we need Py_ssize_t for integers from 0 to 57. -- ___ Python tracker ___ ___ Python-b

[issue19049] itertools.tee isn't 64-bit compliant

2013-09-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Simple patch attached. -- keywords: +patch Added file: http://bugs.python.org/file31814/tee_64b.patch ___ Python tracker ___ ___

[issue19049] itertools.tee isn't 64-bit compliant

2013-09-19 Thread Antoine Pitrou
New submission from Antoine Pitrou: itertools.tee uses ints rather than Py_ssize_t for indices. Using Py_ssize_t would not make the object bigger, since other fields will already be pointer-aligned. -- messages: 198049 nosy: pitrou, rhettinger, serhiy.storchaka priority: normal severit