Re: [Python-Dev] Eliminating loops

2006-07-29 Thread Josiah Carlson
"Charles Vaughn" <[EMAIL PROTECTED]> wrote: > I'm looking for a way of modifying the compiler to eliminate any loops and > recursion from code. It's for a high speed data processing application. > The alternative is a custom language that is little more than gloryfied > assembly. I'd like to be

[Python-Dev] Using Python docs

2006-07-29 Thread Georg Brandl
Regarding bug 469773, I think it would be great to have such a document "Using Python", containing the manual page and platform- specific hints on how to invoke the interpreter and scripts (e.g. explaining the shebang for Unices). I'd be willing to help write up such a document. Another thing th

Re: [Python-Dev] Bad interaction of __index__ and sequence repeat

2006-07-29 Thread Armin Rigo
Hi Guido, On Fri, Jul 28, 2006 at 11:31:09AM -0700, Guido van Rossum wrote: > No time to look through the code here, but IMO it's acceptable (at > least for 2.5) if (2**100).__index__() raises OverflowError, as long > as x[:2**100] silently clips. __index__() is primarily meant to return > a value

Re: [Python-Dev] Bad interaction of __index__ and sequence repeat

2006-07-29 Thread Nick Coghlan
Armin Rigo wrote: > Hi, > > There is an oversight in the design of __index__() that only just > surfaced :-( It is responsible for the following behavior, on a 32-bit > machine with >= 2GB of RAM: > > >>> s = 'x' * (2**100) # works! > >>> len(s) > 2147483647 > > This is becaus

Re: [Python-Dev] New miniconf module

2006-07-29 Thread David Hopwood
Nick Coghlan wrote: > Sylvain Fourmanoit wrote: >>Armin Rigo wrote: >> >>>If it goes in that direction, I'd suggest to rename the module to give >>>it a name closer to existing persistence-related modules already in the >>>stdlib. >> >>I am not especially fond of the current miniconf name either; I

Re: [Python-Dev] Bad interaction of __index__ and sequence repeat

2006-07-29 Thread Nick Coghlan
Nick Coghlan wrote: > The other benefit is that the logic to downconvert to Py_ssize_t that > was formerly invoked by long's __index__ method is now instead invoked > by PyNumber_Index and PyNumber_SliceIndex. This means that directly > calling an __index__() method allows large long results t

[Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-29 Thread Tony Nelson
I'm trying to write a test for my Socket Timeouts patch [1], which fixes signal handling (notably Ctl-C == SIGINT == KeyboarInterrupt) on socket operations using a timeout. I don't see a portable way to send a signal, and asking the test runner to press Ctl-C is a non-starter. A "real" signal is

Re: [Python-Dev] Bad interaction of __index__ and sequence repeat

2006-07-29 Thread Nick Coghlan
Nick Coghlan wrote: > Armin Rigo wrote: >> Hi, >> >> There is an oversight in the design of __index__() that only just >> surfaced :-( It is responsible for the following behavior, on a 32-bit >> machine with >= 2GB of RAM: >> >> >>> s = 'x' * (2**100) # works! >> >>> len(s) >> 2

[Python-Dev] test_uuid

2006-07-29 Thread Neal Norwitz
Ping, I just checked in a change to disable testing 2 uuid functions (_ifconfig_get_node and unixdll_getnode) that fail on many platforms. Here's the message: """ Disable these tests until they are reliable across platforms. These problems may mask more important, real problems. One or both meth

Re: [Python-Dev] uuid test suite failing

2006-07-29 Thread Ka-Ping Yee
On Fri, 28 Jul 2006, Neal Norwitz wrote: > This only fixes 1 of the 2 failures in test_uuid. The other one is > due to _unixdll_getnode() failing. This is because > _uuid_generate_time is None because we couldn't find it in the uuid > library. This is just broken, not sure if it's the code or th

Re: [Python-Dev] test_uuid

2006-07-29 Thread Ka-Ping Yee
On Sat, 29 Jul 2006, Neal Norwitz wrote: > I just checked in a change to disable testing 2 uuid functions > (_ifconfig_get_node and unixdll_getnode) that fail on many platforms. > Here's the message: > > """ > Disable these tests until they are reliable across platforms. These > problems may mask m

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-29 Thread Josiah Carlson
Tony Nelson <[EMAIL PROTECTED]> wrote: > > I'm trying to write a test for my Socket Timeouts patch [1], which fixes > signal handling (notably Ctl-C == SIGINT == KeyboarInterrupt) on socket > operations using a timeout. I don't see a portable way to send a signal, > and asking the test runner to

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-29 Thread Jean-Paul Calderone
On Sat, 29 Jul 2006 14:38:38 -0700, Josiah Carlson <[EMAIL PROTECTED]> wrote: > >If someone is looking for a project for 2.6 that digs into all sorts of >platform-specific nastiness, they could add actual signal sending to the >signal module (at least for unix systems). > Maybe I am missing someth

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-29 Thread Tony Nelson
At 2:38 PM -0700 7/29/06, Josiah Carlson wrote: >Tony Nelson <[EMAIL PROTECTED]> wrote: >> >> I'm trying to write a test for my Socket Timeouts patch [1], which fixes >> signal handling (notably Ctl-C == SIGINT == KeyboarInterrupt) on socket >> operations using a timeout. I don't see a portable wa