[issue2702] pickling of large recursive structures crashes cPickle

2008-06-25 Thread Ralf Schmitt

Ralf Schmitt <[EMAIL PROTECTED]> added the comment:

The tests pass on my machine (64 bit debian testing) with cpickle2.patch.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-25 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

Sorry, the flag *does* make a difference.  Ignoring errno, the results for 
32- and 64-bit do match.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-25 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

Unless I am doing something wrong, that flag does not fix the problem.

#include 
#include 
#include 

int main(int argc, char *argv[])
{
errno = 0;
printf("%f %d\n", log(-HUGE_VAL), errno);
errno = 0;
printf("%f %d\n", log( HUGE_VAL), errno);
}

/* result is different for 32- and 64-bit

> rm a.out; cc -xtarget=native -xlibmieee log_inf.c -lm ; a.out
-NaN 33
Inf 0

> rm a.out ; cc -xtarget=native64 -xlibmieee log_inf.c -lm ; a.out
-NaN 0
Inf 0

#define EDOM 33 in /usr/include/sys/errno.h

*/

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-06-25 Thread Phillip J. Eby

Phillip J. Eby <[EMAIL PROTECTED]> added the comment:

I'm good with it; the issue with the comment in core.py was my only 
remaining objection.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2702] pickling of large recursive structures crashes cPickle

2008-06-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Another version of the patch, that removes the self->nesting member and
uses the Py_EnterRecursiveCall machinery.
I prefer it because it takes into account the depth of the current
python call stack.

Added file: http://bugs.python.org/file10738/cpickle2.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2702] pickling of large recursive structures crashes cPickle

2008-06-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

It seems that each self->nesting++ should be balanced with
self->nesting--. Attached patch enables all tests and corrects the issue

--
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file10737/cpickle.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Closing as "already resolved in the upcoming release"

--
status: pending -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-06-25 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

+1 on removing the trailing L from the repr.

+0 on trying to reduce the values to ints; that would be dead-end code
since in 3.0 it's a non-issue.  And it doesn't solve the problem with repr.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3203] sphinx - table of contents doesn't render correctly (html)

2008-06-25 Thread Gerard M. Flanagan

New submission from Gerard M. Flanagan <[EMAIL PROTECTED]>:

A TOC tree should render in HTML as a single 'ul', but in certain
circumstances it appears as multiple ul's.

You can see the effect here:

http://docs.python.org/dev/c-api/index.html

and in fact in the Sphinx documentation itself:

http://sphinx.pocoo.org/contents.html

the 'toctree' here is not an individual entity but a vertical series of
ul's, each of which has a *single* item (li). You may be able to see the
slightly increased space between the ul's which would not be present if
these were all the children of a single parent.

This should be changed so that pages have a unique 'toc' element because:

- it would be easier for css and javascript to manipulate
- there may be accessibility issues (eg. non-visual readers may not 
identify the toc as a single sequence of alternatives)

The reason for the current behaviour can be found in the method
'resolve_toctree' of class sphinx.environment.BuildEnvironment, line 863::

  newnode = addnodes.compact_paragraph('', '', *tocentries)

`tocentries` is a list of `toctrees` [, ,..] each of
which will end up as a ul, while a compact_paragraph has no html
representation; hence the observed effect.

One way to fix this is to replace the above line with the following::

newnode = nodes.bullet_list()
for entry in tocentries:
for item in entry.children:
assert isinstance(item, nodes.list_item)
newnode.append(item)

(and you can also take the opportunity here to add a unique id::

newnode['ids'].append('toc')
)

Note that this new code is a noop if `tocentries` only has one element,
at least as far as html is concerned.

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 68756
nosy: georg.brandl, grflanagan
severity: normal
status: open
title: sphinx - table of contents doesn't render correctly (html)
type: behavior
versions: Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-06-25 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Formally, the beta deadline has passed, so no new features can be
admitted. If pje is now happy with the code as it stands (not clear from
the last message), I can ask for permission to commit it, anyway.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3201] struct.Struct size attribute undocumented

2008-06-25 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

It's documented in the 2.6/3.0 docs:
http://docs.python.org/dev/library/struct.html#id1.

--
nosy: +benjamin.peterson
resolution:  -> out of date
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3202] Wish: disable tests in unittest

2008-06-25 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

If you could convince Python-dev for something like this, I'd gladly
implement it. In fact, I'm working implementing this for the Python test
suite (It's called skipping).

--
nosy: +benjamin.peterson
priority:  -> low
versions: +Python 2.7 -Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3202] Wish: disable tests in unittest

2008-06-25 Thread Justin Mazzola Paluska

Changes by Justin Mazzola Paluska <[EMAIL PROTECTED]>:


--
type:  -> feature request

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3202] Wish: disable tests in unittest

2008-06-25 Thread Justin Mazzola Paluska

Changes by Justin Mazzola Paluska <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10736/sample_tests.py

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3202] Wish: disable tests in unittest

2008-06-25 Thread Justin Mazzola Paluska

New submission from Justin Mazzola Paluska <[EMAIL PROTECTED]>:

The attached patch (unittest-disable.patch) allows methods in
unittest.TestCases to be "disabled".  The patch is against
Python2.5 from Debian:

%python2.5
Python 2.5.2 (r252:60911, Apr 17 2008, 13:15:05) 
[GCC 4.2.3 (Debian 4.2.3-3)] on linux2

Disabled tests are not run, but are "remembered" in the output of the
test program.  For example, the attached sample_tests.py has two
tests, one of which has been disabled.  The output is:

%python sample_tests.py 
.D
--
Ran 2 tests in 0.000s

OK

where the D indicates that a test has been disabled.

Disabling tests is useful if you're using a "test first" coding
workflow, as some tests may test functionality that hasn't been
implemented yet.  The failures of these tests (with their noisy
tracebacks) makes it harder to concentrate on other, real failures
that may be occurring in your tests.

--
components: Library (Lib)
files: unittest-disable.patch
keywords: patch
messages: 68752
nosy: jmp
severity: normal
status: open
title: Wish: disable tests in unittest
versions: Python 2.5
Added file: http://bugs.python.org/file10735/unittest-disable.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3087] Clean up Demos and Tools

2008-06-25 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

On Wed, Jun 25, 2008 at 2:08 PM, David <[EMAIL PROTECTED]> wrote:
>
> David <[EMAIL PROTECTED]> added the comment:
>
> I will take this one on.  I'll download 3.x this weekend and begin.
> What is the best way to proceed?  Post each program as it is changed or a
> note that no change is required?  It can get lengthy if all of the
> programs are posted here.

Thanks for volunteering!

Make a list of the ones which should go completely (ie demonstrate
removed modules and features or are broken beyond repair) and post a
patch with changes to the others.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header

2008-06-25 Thread Ori Avtalion

Ori Avtalion <[EMAIL PROTECTED]> added the comment:

I think there's been a little misinterpretation of the standard in the
comments above.

It's important to note that RFC 2822 basically defines folding as
"adding a CRLF before an existing whitespace in the original message". 

See http://tools.ietf.org/html/rfc2822#section-2.2.3

It does *not* allow prepending folded lines with extra characters that
were not in the original message such as '\t' or ' '.

This is exactly what _encode_chunks does in header.py:
joiner = NL + self._continuation_ws

(Note that the email package docs and Header docstring use the word
'prepend' which is reflects the error in the code).

With a correct implementation, why would I want to choice of which type
of character to line-break on when folding?
The whole notion of controlling the value of continuation_ws seems wrong.

However, changing the default continuation_ws to ' ', as the patch
suggests, will output syntactically correct headers in the majority of
cases (due to other bugs that remove trailing whitespace and merge
consecutive whitespace into one character).


All in all, I agree with the change of the default continuation_ws due
to its lucky side-effects, but as Barry hinted, the algorithm needs some
serious work to really output valid headers.

Some examples of the good and bad behaviors:

>>> from email.Header import Header
>>> l = ['<[EMAIL PROTECTED]>' % i for i in range(8)]

>>> # this turns out fine
>>> Header(' '.join(l), continuation_ws=' ').encode()
'<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL 
PROTECTED]> <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>\n <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>'

# This does not fold even though it should
>>> Header('\t'.join(l), continuation_ws=' ').encode()
'<[EMAIL PROTECTED]>\t<[EMAIL PROTECTED]>\t<[EMAIL PROTECTED]>\t<[EMAIL 
PROTECTED]>\t<[EMAIL PROTECTED]>\t<[EMAIL PROTECTED]>\t<[EMAIL 
PROTECTED]>\t<[EMAIL PROTECTED]>'

# And here the 4-char whitespace is shrinked into one
>>> Header(''.join(l), continuation_ws=' ').encode()
'<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL 
PROTECTED]> <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>\n <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>'

--
nosy: +salty-horse

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit

Eric Sadit <[EMAIL PROTECTED]> added the comment:

#!/usr/bin/python

import sys
import thread

f = file("o.test","w")
buff = " " * 1024
def run():
while 1:
try:
f.read(100)
#
f.write(buff)

except Exception, e:
print >>sys.stderr, "An exception, that's OK, ", repr(e)

if __name__ == '__main__':
thread.start_new_thread(run, (), {})
while 1:
try:
f.close()
except Exception, e:
print >>sys.stderr, "An exception, main thread ", repr(e)

f = file("o.test","w")

On Wed, Jun 25, 2008 at 2:36 PM, Eric Sadit Téllez Avila <[EMAIL PROTECTED]>
wrote:

> The test script
>
> #!/usr/bin/python
>
> import sys
> import thread
>
> f = file("o.test","w")
> buff = " " * 1024
> def run():
> while 1:
> try:
> f.read(100)
> #
> f.write(buff)
>
> except Exception, e:
> print >>sys.stderr, "An exception, that's OK, ", repr(e)
>
> if __name__ == '__main__':
> thread.start_new_thread(run, (), {})
> while 1:
> try:
>
>
> On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit <[EMAIL PROTECTED]>
> wrote:
>
>>
>> Eric Sadit <[EMAIL PROTECTED]> added the comment:
>>
>>
>> Thanks Amaury
>>
>> I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly
>> throwing a ValueError exception (Operation of closed file)
>> in the reader/writer thread and "IOError: close() called during concurrent
>> operation on the same file object" in the closer thread.
>> Python doesn't crash anymore.
>>
>> Cheers
>>
>> Eric Sadit
>>
>> On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc <
>> [EMAIL PROTECTED]> wrote:
>>
>> >
>> > Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
>> >
>> > This problem may be a duplicate of issue815646 and issue595601, and was
>> > probably corrected with r62195.
>> >
>> > Can you please check with the new python version 2.6b1 ?
>> >
>> > --
>> > nosy: +amaury.forgeotdarc
>> > resolution:  -> out of date
>> > status: open -> pending
>> >
>> > ___
>> > Python tracker <[EMAIL PROTECTED]>
>> > 
>> > ___
>> >
>>
>> Added file: http://bugs.python.org/file10732/unnamed
>>
>> ___
>> Python tracker <[EMAIL PROTECTED]>
>> 
>> ___
>>
>
>

Added file: http://bugs.python.org/file10734/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___#!/usr/bin/python 
 import sysimport threadf = 
file("o.test","w")
buff = " " * 1024def run():    while 
1:    
try:    
f.read(100)   
 # 
f.write(buff)   
 
    except Exception, 
e:    print 
>>sys.stderr, "An exception, that's OK, ", 
repr(e)if __name__ == '__main__':    
thread.start_new_thread(run, (), {})    while 1:
    
try:    
f.close()    except Exception, 
e:    print 
>>sys.stderr, "An exception, main thread ", 
repr(e)    f = 
file("o.test","w")
On Wed, Jun 25, 2008 at 2:36 PM, Eric Sadit 
Téllez Avila [EMAIL PROTECTED]> 
wrote:
The test 
script#!/usr/bin/python 
 import sysimport threadf = 
file("o.test","w")

buff = " " * 1024def run():    while 
1:    
try:    
f.read(100)   
 # 
f.write(buff)   
 

    except Exception, 
e:    print 
>>sys.stderr, "An exception, that's OK, ", 
repr(e)if __name__ == '__main__':    
thread.start_new_thread(run, (), {})    while 1:

    try:On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit [EMAIL PROTECTED]> 
wrote:


Eric Sadit [EMAIL 
PROTECTED]> added the comment:

Thanks Amaury

I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly
throwing a ValueError exception (Operation of closed file)
in the reader/writer thread and "IOError: close() called during 
concurrent
operation on the same file object" in the closer thread.
Python doesn't crash anymore.

Cheers

Eric Sadit

On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc <
mailto:[EMAIL PROTECTED]" target="_blank">[EMAIL PROTECTED]> 
wrote:

>
> Amaury Forgeot d'Arc [EMAIL PROTECTED]> added 
the comment:
>
> This problem may be a du

[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit

Eric Sadit <[EMAIL PROTECTED]> added the comment:

The test script

#!/usr/bin/python

import sys
import thread

f = file("o.test","w")
buff = " " * 1024
def run():
while 1:
try:
f.read(100)
#
f.write(buff)

except Exception, e:
print >>sys.stderr, "An exception, that's OK, ", repr(e)

if __name__ == '__main__':
thread.start_new_thread(run, (), {})
while 1:
try:

On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit <[EMAIL PROTECTED]> wrote:

>
> Eric Sadit <[EMAIL PROTECTED]> added the comment:
>
> Thanks Amaury
>
> I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly
> throwing a ValueError exception (Operation of closed file)
> in the reader/writer thread and "IOError: close() called during concurrent
> operation on the same file object" in the closer thread.
> Python doesn't crash anymore.
>
> Cheers
>
> Eric Sadit
>
> On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
> >
> > This problem may be a duplicate of issue815646 and issue595601, and was
> > probably corrected with r62195.
> >
> > Can you please check with the new python version 2.6b1 ?
> >
> > --
> > nosy: +amaury.forgeotdarc
> > resolution:  -> out of date
> > status: open -> pending
> >
> > ___
> > Python tracker <[EMAIL PROTECTED]>
> > 
> > ___
> >
>
> Added file: http://bugs.python.org/file10732/unnamed
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

Added file: http://bugs.python.org/file10733/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___The test 
script#!/usr/bin/python 
 import sysimport threadf = 
file("o.test","w")
buff = " " * 1024def run():    while 
1:    
try:    
f.read(100)   
 # 
f.write(buff)&n!
 bsp;   
    except Exception, 
e:    print 
>>sys.stderr, "An exception, that's OK, ", 
repr(e)if __name__ == '__main__':    
thread.start_new_thread(run, (), {})    while 1:
    try:On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit [EMAIL PROTECTED]> wrote:

Eric Sadit [EMAIL PROTECTED]> 
added the comment:

Thanks Amaury

I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly
throwing a ValueError exception (Operation of closed file)
in the reader/writer thread and "IOError: close() called during 
concurrent
operation on the same file object" in the closer thread.
Python doesn't crash anymore.

Cheers

Eric Sadit

On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc <
mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]> wrote:

>
> Amaury Forgeot d'Arc [EMAIL PROTECTED]> added the comment:
>
> This problem may be a duplicate of issue815646 and issue595601, and was
> probably corrected with r62195.
>
> Can you please check with the new python version 2.6b1 ?
>
> --
> nosy: +amaury.forgeotdarc
> resolution:  -> out of date
> status: open -> pending
>
> ___
> Python tracker [EMAIL 
PROTECTED]>
> http://bugs.python.org/issue3200>
> ___
>

Added file: http://bugs.python.org/file10732/unnamed"; 
target="_blank">http://bugs.python.org/file10732/unnamed

___
Python tracker [EMAIL 
PROTECTED]>
http://bugs.python.org/issue3200>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit

Eric Sadit <[EMAIL PROTECTED]> added the comment:

Thanks Amaury

I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly
throwing a ValueError exception (Operation of closed file)
in the reader/writer thread and "IOError: close() called during concurrent
operation on the same file object" in the closer thread.
Python doesn't crash anymore.

Cheers

Eric Sadit

On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc <
[EMAIL PROTECTED]> wrote:

>
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
>
> This problem may be a duplicate of issue815646 and issue595601, and was
> probably corrected with r62195.
>
> Can you please check with the new python version 2.6b1 ?
>
> --
> nosy: +amaury.forgeotdarc
> resolution:  -> out of date
> status: open -> pending
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

Added file: http://bugs.python.org/file10732/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___Thanks AmauryI run a test script and Python 2.5.2 crashes, but 2.6b1 
runs perfectly throwing a ValueError exception (Operation of closed file)in 
the reader/writer thread and "IOError: close() called during concurrent 
operation on the same file object" in the closer thread.
Python doesn't crash anymore.CheersEric SaditOn Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc 
[EMAIL PROTECTED]> wrote:

Amaury Forgeot d'Arc [EMAIL 
PROTECTED]> added the comment:

This problem may be a duplicate of issue815646 and issue595601, and was
probably corrected with r62195.

Can you please check with the new python version 2.6b1 ?

--
nosy: +amaury.forgeotdarc
resolution:  -> out of date
status: open -> pending

___
Python tracker [EMAIL 
PROTECTED]>
http://bugs.python.org/issue3200>
___

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3179] cPickle is seriously broken

2008-06-25 Thread Facundo Batista

Changes by Facundo Batista <[EMAIL PROTECTED]>:


--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3179] cPickle is seriously broken

2008-06-25 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

I reverted the patch, commented out the previous test, and included this
one in the test suite, to never break it again, ;)

I hope we now find a solution to the issue #2702.

Thank you!!

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2702] pickling of large recursive structures crashes cPickle

2008-06-25 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

I reverted the patch, because of #3179, so I'm reopening this.

Note that I left the test in the suite, but commented out (if you find a
patch that solves this, activate the test again).

--
resolution: fixed -> 
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3165] cPickle recursion problem

2008-06-25 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

I'm reverting this patch, see issue #3179.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3201] struct.Struct size attribute undocumented

2008-06-25 Thread Eric Vander Weele

New submission from Eric Vander Weele <[EMAIL PROTECTED]>:

The .size attribute of struct.Struct is undocumented on
http://docs.python.org/lib/struct-objects.html

--
assignee: georg.brandl
components: Documentation
messages: 68743
nosy: ericvw, georg.brandl
severity: normal
status: open
title: struct.Struct size attribute undocumented
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3087] Clean up Demos and Tools

2008-06-25 Thread David

David <[EMAIL PROTECTED]> added the comment:

I will take this one on.  I'll download 3.x this weekend and begin.  
What is the best way to proceed?  Post each program as it is changed or a 
note that no change is required?  It can get lengthy if all of the 
programs are posted here.

--
nosy: +dwblas

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-06-25 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Attaching a patch that includes normalization to a leading 1.

Added file: http://bugs.python.org/file10731/float8.diff

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit

Eric Sadit <[EMAIL PROTECTED]> added the comment:

Ok, I will try to reproduce it in the python 2.6b1 version, and I report to
you the result

Saludos

On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc <
[EMAIL PROTECTED]> wrote:

>
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
>
> This problem may be a duplicate of issue815646 and issue595601, and was
> probably corrected with r62195.
>
> Can you please check with the new python version 2.6b1 ?
>
> --
> nosy: +amaury.forgeotdarc
> resolution:  -> out of date
> status: open -> pending
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

Added file: http://bugs.python.org/file10730/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___Ok, I will try to reproduce it in the python 2.6b1 version, and I report to you 
the resultSaludosOn Wed, Jun 25, 
2008 at 12:44 PM, Amaury Forgeot d'Arc [EMAIL PROTECTED]> wrote:

Amaury Forgeot d'Arc [EMAIL 
PROTECTED]> added the comment:

This problem may be a duplicate of issue815646 and issue595601, and was
probably corrected with r62195.

Can you please check with the new python version 2.6b1 ?

--
nosy: +amaury.forgeotdarc
resolution:  -> out of date
status: open -> pending

___
Python tracker [EMAIL 
PROTECTED]>
http://bugs.python.org/issue3200>
___

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-06-25 Thread Peter Fein

Peter Fein <[EMAIL PROTECTED]> added the comment:

Is this going to make the 2.6 release?  The lack of this option causes 
grief on MacPorts.  Just wondering if there's anything I could do to move 
this along, as a cursory reading shows everyone to be happy...

--
nosy: +pfein

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

This problem may be a duplicate of issue815646 and issue595601, and was
probably corrected with r62195.

Can you please check with the new python version 2.6b1 ?

--
nosy: +amaury.forgeotdarc
resolution:  -> out of date
status: open -> pending

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-06-25 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Well, here's some Python code to output C99-style hexadecimal 
representations of floats.  It's not quite the same as Java's output, 
which also special cases IEEE 754 subnormals (writing them with a fixed 
exponent of -1022 and a '0' before the point).  But then Python doesn't 
have the luxury of knowing that its floats are IEEE 754 format.

The big downside is that the output format has a decimal point in it, so 
won't be eval-able.

Added file: http://bugs.python.org/file10729/hex_float.py

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3200] Python's crash in heavy multithreading IO operations

2008-06-25 Thread Eric Sadit

New submission from Eric Sadit <[EMAIL PROTECTED]>:

Hello,

I found a rare bug in heavy multithreading IO operations. The bug arises
under a stupid sequence of I/O operations. The sequence is not a normal
one, but the real problem is that the Python's interpreter crashes. The
correct behavior should be raise an IOError exception (I think).

The bug occurs when some thread closes a file or socket whilst other
thread tries to read or write from the same socket. The failure it's
inside the fileobject.c because tries to read or write the specified
data size inside a loop without check in every iteration if the object
is closed (it checks only outside the loop). The file object is set to
NULL and a SIGSEGV happens.

I'm a python developer (in the language, but not developer of the
language), so i really don't know anything about the best way to solve
this issue, and how the project it's managed. I can develop an script to
raise this bug if anyone it's interested in this problem. I'm already
owns one, but I don't find it, and the real program that arises the
error was rewritten so i don't have it.

Cheers

Eric Sadit

--
components: Interpreter Core, Library (Lib)
messages: 68736
nosy: sadit
severity: normal
status: open
title: Python's crash in heavy multithreading IO operations
type: crash
versions: Python 2.3, Python 2.4, Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-25 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

issue 1762972 supercedes this.

--
nosy: +brett.cannon
superseder:  -> 'exec' does not accept what 'open' returns

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3197] Documentation for fractions module needs work

2008-06-25 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Here's a proposed new draft of the fractions documentation for 2.6.  
Apart from wording changes, it:

 - removes documentation for __floor__, __ceil__ and __round__, since
   those no longer exist in 2.6

 - describes construction from a decimal string;  e.g. Fraction('1.23')

 - gives the acceptable string inputs using BNF rather than via a regex.

Jeffrey: does this look reasonable?

--
keywords: +patch
Added file: http://bugs.python.org/file10728/fractions_doc.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-06-25 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

How would the algorithm need to change to support leading-1 
normalization?

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-06-25 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

+1 on removing the L. Also, it would be nice if reduced fractions were 
restored to ints after the gcd step:

>>> Fraction(1*10**18, 3*10**18)
Fraction(1L, 3L)

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3199] 2.6b1 Build Fails On OSX 10.5

2008-06-25 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Fixed in r64526.

Thanks for the report!

--
nosy: +marketdickinson
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3199] 2.6b1 Build Fails On OSX 10.5

2008-06-25 Thread John Abel

New submission from John Abel <[EMAIL PROTECTED]>:

The build process on Leopard fails:

cd Mac && make altinstallunixtools DESTDIR=""
if [ ! -d "/usr/local/bin" ]; then  \
/usr/bin/install -c -d -m 755 "/usr/local/bin" ;\
fi
for fn in python2.6 pythonw2.6 idle2.6 \
  pydoc2.6 python2.6-config) smtpd2.6.py ;\
do \
ln -fs 
"/Library/Frameworks/Python.framework/Versions/2.6/bin/${fn}" 
"/usr/local/bin/${fn}" ;\
done
/bin/sh: -c: line 0: syntax error near unexpected token `)'
/bin/sh: -c: line 0: `for fn in python2.6 pythonw2.6 idle2.6  
pydoc2.6 python2.6-config) smtpd2.6.py ;do  ln -fs 
"/Library/Frameworks/Python.framework/Versions/2.6/bin/${fn}" 
"/usr/local/bin/${fn}" ;done'
make[1]: *** [altinstallunixtools] Error 2
make: *** [frameworkaltinstallunixtools] Error 2

To fix, remove the additional ) following -config on line 116 of 
Mac/Makefile:

  pydoc$(VERSION) python$(VERSION)-config) 
smtpd$(VERSION).py ;\

--
components: Build
messages: 68730
nosy: johna
severity: normal
status: open
title: 2.6b1 Build Fails On OSX 10.5
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3198] strings don't seem to roundtrip with repr()

2008-06-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

repr() is supposed to round-trip with eval() for common types.

str() is the function that round-trips with the original type:

>>> x = 5
>>> x == int(str(x))
True
>>> x = "Test Text"
>>> x == str(str(x))#  :-)
True

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3198] strings don't seem to roundtrip with repr()

2008-06-25 Thread Mark Summerfield

New submission from Mark Summerfield <[EMAIL PROTECTED]>:

With 2.5.2 and 30b1 strings don't round trip like numbers do.

I guess it has been like this a long time so isn't a bug, but it does
seem inconsistent.

Both 2.5.2 and 30b1:

>>> x = 5
>>> x == int(repr(x))
True
>>> x = "Test Text"
>>> x == str(repr(x))
False

The reason is that an extra set of enclosing quotes are added.

--
components: Interpreter Core
messages: 68728
nosy: mark
severity: normal
status: open
title: strings don't seem to roundtrip with repr()
type: behavior
versions: Python 2.5, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue678464] Docs don't define sequence-ness very well

2008-06-25 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

What is the bug actually? "for k in s" is defined to work on any
iterable, not only on sequences. And "iterable" is clearly defined, it's
sufficient to check whether s.__iter__ exists or whether iter(s) succeeds...

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3194] Demo/loop.c passing "char *" instead of "wchar_t *"

2008-06-25 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Martin, you made the changes. Could you look at this, please?

--
assignee:  -> loewis
nosy: +benjamin.peterson, loewis

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean

2008-06-25 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3196] Option in pydoc to show docs from private methods

2008-06-25 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions: +Python 2.7 -Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-06-25 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

I'm reopening this to propose a last-minute minor change:

Can we remove the trailing 'L' from the numerator and denominator in
the repr of a Fraction instance?  E.g.,

>>> x = Fraction('9.876543210')
>>> x
Fraction(987654321L, 1L)
>>> x * (1/x)
Fraction(1L, 1L)

I'd rather see Fraction(987654321, 1) and Fraction(1, 1).  Does 
the 'L' serve any useful purpose?

--
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3197] Documentation for fractions module needs work

2008-06-25 Thread Mark Dickinson

New submission from Mark Dickinson <[EMAIL PROTECTED]>:

The documentation for the fractions module needs some rewriting---it 
contains minor inaccuracies, outdated statements (e.g. the regex is 
incomplete), and there are places that could use some clarification (e.g. 
the description of __round__).

I plan to take care of this in the next few days, unless anyone else wants 
to have a look.  I'm making an issue of it so that it doesn't get 
forgotten.

--
assignee: marketdickinson
components: Documentation
messages: 68724
nosy: jyasskin, marketdickinson
priority: normal
severity: normal
status: open
title: Documentation for fractions module needs work
versions: Python 2.6, Python 2.7, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean

2008-06-25 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Indeed, this is not a bug, although it can be misleading.
Generally, if you test for None, it is better to write "if x is None",
it is at the same time more accurate, more explicit for someone reading
your code, and also executes faster than "if not x".

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3196] Option in pydoc to show docs from private methods

2008-06-25 Thread Morten Lied Johansen

New submission from Morten Lied Johansen <[EMAIL PROTECTED]>:

Currently, running pydoc on a module will show you the documentation on 
all regular methods, and all special methods (starting and ending in 
double underscores).

Private methods (starting with a single underscore) are not included.

Some times, it would be nice to include docs for these methods aswell, 
and a small change to pydoc.visiblename solves the problem.

I've included a patch that adds this behaviour as an option (-i for 
include private names). The implementation isn't as clean as one would 
hope for (sets a global flag), but was the best I could come up with in 
the short time I had available. Feel free to make a better 
implementation.

The patch is against python 2.5.

--
components: Library (Lib)
files: pydoc.privatenames.patch
keywords: patch
messages: 68722
nosy: mortenlj
severity: normal
status: open
title: Option in pydoc to show docs from private methods
type: feature request
versions: Python 2.5
Added file: http://bugs.python.org/file10727/pydoc.privatenames.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean

2008-06-25 Thread Andrii V. Mishkovskyi

Andrii V. Mishkovskyi <[EMAIL PROTECTED]> added the comment:

To quote Python Library Reference, paragraph 3.1:
"""Any object can be tested for truth value, for use in an if or while
condition or as operand of the Boolean operations below. The following
values are considered false: 
[skipped]
 - instances of user-defined classes, if the class defines a
__nonzero__() or __len__() method, when that method returns the integer
zero or bool value False.
"""
And back to python console:
In [112]: from xml.etree.ElementTree import Element

In [113]: e = Element('foo', {'key': 'value'})

In [114]: len(e)
Out[114]: 0

In [115]: not e
Out[115]: True

This is because Element is just a container and acts more like a list.
So, if you actually append items to this list-like structure, you'll get
this:

In [116]: e.append(Element('bar', {42: 1337}))

In [117]: e.append(Element('baz', {'whatever': 'wherever'}))

In [118]: len(e)
Out[118]: 2

In [119]: not e
Out[119]: False

In conclusion, this just doesn't look like a bug to me. You could try
using "if e is not None" form.

--
nosy: +mishok13

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean

2008-06-25 Thread Pavel Strashkin

New submission from Pavel Strashkin <[EMAIL PROTECTED]>:

Python 2.5.2 (r252:60911, May  7 2008, 15:19:09)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.etree.ElementTree import Element
>>> e = Element('Test', {'attr' : 'value'})
>>> b = not e
>>> print b
True

Why i'm getting True here instead of False?
Because of this i can not do:
if not e:
# here some logic
pass

--
components: XML
messages: 68720
nosy: xaka
severity: normal
status: open
title: invalid conversion xml.etree.ElementTree.Element object to boolean
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-25 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Nice reply from zal.  His conclusion:

> The short answer to your question is to use the cc -xlibmieee
> option (and not rely on errno in the case of log(-Inf)) if you
> would like to see results in the spirit of IEEE 754.

It sounds like using the -xlibmieee flag is the way to go.  (math_1 is 
already doing an excellent job of not relying on errno).

Could you try compiling with this flag to see whether it fixes the 
problem?  (Opening up the 'configure' file and adding the flag to 
BASECFLAGS might be the easiest way to do this; there may be easier 
ways.) If it does, I'll cook up a configure patch.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-06-25 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

> -1 on Nick's suggestion to normalize hex output so that nearby floats 
> have nearby reprs.  This unnecessarily complicates a simple, straight-
> forward presentation.  In the paper referenced by Terry Reedy, 
> normalized presentations were not used

As far as I can tell, that paper *does* use normalized presentations:  
with the exception of subnormals and zeros, all hex floats have a leading 
digit of 1.  This is the same normalization that Java's toHexString uses, 
and that C's printf %a format modifier uses on all machines that I've 
tested (though the C standards don't seem to lay down the law on this).

I think this is helpful.  For example, on the first page of section 4.1 of 
the paper Terry Reedy references, the author gives two different results 
produced by running the same sin() computation on different systems.  The 
results are:

-0x1.95b011554d4b5p-1

and

-0x1.95b0115490ca6p-1.

Looking at these results, it's readily apparent that the error is somewhat 
less than 1000 ulps.  But the current hex() output for these two numbers 
is:

'-0x195b011554d4b5 * 2.0 ** -53'

and

'-0xcad808aa48653 * 2.0 ** -52'

It's much less clear that these numbers are close, or how close they are.

I guess I just have a feeling that changes to the least significant bits 
of a number shouldn't produce big changes in its representation.

> and I've never seen that done anywhere else.

I'm not sure I've ever seen this *not* done anywhere else.

P.S. You should blame me for the normalization comment, not Nick. :)

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1524] os.system() fails for commands with multiple quoted file names

2008-06-25 Thread daniel.weyh

daniel.weyh <[EMAIL PROTECTED]> added the comment:

Got similiar problem. Think it's a thing with the pipe '>'.

Try calling the windows-shell (e.g. C:\WINDOWS\system32\cmd.exe) with
'/C' and your comman dline after that (in quotes).
> subprocess.call(r'C:\WINDOWS\system32\cmd.exe /C "YourCommand >
YourOutput"')

For me it works when there are now newlines in YourCommand and YourOutput.

--
nosy: +d4rk1

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com