En Wed, 03 Oct 2007 08:46:31 -0300, <[EMAIL PROTECTED]> escribi�:
> in python2.4, i read lines from a file with
>
> for lineNum, line in enumerate(f): ...
>
> However, lineNum soon overflows and starts counting backwards. How do
> i force enumerate to return long integer?
(what kind of files are
On Oct 3, 12:52 pm, koara <[EMAIL PROTECTED]> wrote:
> Thanks everybody for the reply and suggestions, I'm glad to see the
> issues's already been discovered/discussed/almostresolved.
The new code is checked-in. In Py2.6, enumerate() will no longer
raise an OverflowError and it will automatically
On Oct 3, 7:22 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> In Py2.6, I will mostly likely put in an automatic promotion to long
> for both enumerate() and count(). It took a while to figure-out how
> to do this without killing the performance for normal cases (ones used
> in real programs,
Raymond Hettinger <[EMAIL PROTECTED]> writes:
> [Paul Rubin]
>> I hope in 3.0 there's a real fix, i.e. the count should promote to
>> long.
>
> In Py2.6, I will mostly likely put in an automatic promotion to long
> for both enumerate() and count(). It took a while to figure-out how
> to do this w
Raymond Hettinger <[EMAIL PROTECTED]> writes:
> In Py2.6, I will mostly likely put in an automatic promotion to long
> for both enumerate() and count(). It took a while to figure-out how
> to do this without killing the performance for normal cases (ones used
> in real programs, not examples contr
[Paul Rubin]
> I hope in 3.0 there's a real fix, i.e. the count should promote to
> long.
In Py2.6, I will mostly likely put in an automatic promotion to long
for both enumerate() and count(). It took a while to figure-out how
to do this without killing the performance for normal cases (ones used
Tim Chase <[EMAIL PROTECTED]> writes:
> I'd consider this a bug: either in the implementation of enumerate(),
> or in the documentation
>
> http://docs.python.org/lib/built-in-funcs.html#l2h-24
2.5 has a patch that causes enumerate() and count() to raise overflow
if the count wraps around, which
Steve Holden wrote:
> I wouldn't dream of suggesting it's impossible.
> I just regard "soon" as less than an hour in
> commuter's terms, I suppose.
Sadly, speaking as a Londoner, an hour is indeed
"soon" in commuter terms.
TJG
--
http://mail.python.org/mailman/listinfo/python-list
Tim Chase wrote:
>>> for lineNum, line in enumerate(f): ...
>>>
>>> However, lineNum soon overflows and starts counting backwards. How do
>>> i force enumerate to return long integer?
>>>
>> Just how "soon" exactly do you read sys.maxint lines from a file? I
>> should have thought that it would ta
>> for lineNum, line in enumerate(f): ...
>>
>> However, lineNum soon overflows and starts counting backwards. How do
>> i force enumerate to return long integer?
>>
> Just how "soon" exactly do you read sys.maxint lines from a file? I
> should have thought that it would take a significant amount
[EMAIL PROTECTED] wrote:
> Hello all,
>
> in python2.4, i read lines from a file with
>
> for lineNum, line in enumerate(f): ...
>
> However, lineNum soon overflows and starts counting backwards. How do
> i force enumerate to return long integer?
>
Just how "soon" exactly do you read sys.maxint
>> in python2.4, i read lines from a file with
>>
>> for lineNum, line in enumerate(f): ...
>>
>> However, lineNum soon overflows and starts counting backwards. How do
>> i force enumerate to return long integer?
>
> Most probably you can't, because it is a C-written function I presume.
>
> But a
[EMAIL PROTECTED] schrieb:
> Hello all,
>
> in python2.4, i read lines from a file with
>
> for lineNum, line in enumerate(f): ...
>
> However, lineNum soon overflows and starts counting backwards. How do
> i force enumerate to return long integer?
Most probably you can't, because it is a C-wri
Hello all,
in python2.4, i read lines from a file with
for lineNum, line in enumerate(f): ...
However, lineNum soon overflows and starts counting backwards. How do
i force enumerate to return long integer?
Cheers.
--
http://mail.python.org/mailman/listinfo/python-list
14 matches
Mail list logo