[issue3449] Update decimal module to version 1.68 of the IBM specification

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Fixed, r65257. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3451] Asymptotically faster divmod and str(long)

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: > Would there be any interest in porting these algorithms to C and using > them in the standard Python long implementation? Yes, definitely! Though it depends a little bit how much complication is involved. A subquadratic algorithm for con

[issue3439] math.frexp and obtaining the bit size of a large integer

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: I'd also be interested in having _PyLong_NumBits exposed to Python in some way or another. It's something I've needed many times before, and it's used in the decimal module, for example. My favorite workaround uses hex instead of bin: 4*l

[issue3436] csv.DictReader inconsistency

2008-07-26 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Like Raymond, I have issues with the idea of implicitly reading the headers in __init__, but would be fine with the idea of a separate method in 2.7/3.1. As far as working around the absence of such a method goes, I personally use itertools.cha

[issue3436] csv.DictReader inconsistency

2008-07-26 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: I should also point out that I've generally used this technique to populate the fieldnames attribute from the file: f = open("somefile.csv", "rb") rdr = csv.DictReader(f, fieldnames=csv.reader(f).next()) So it is fairly trivial to s

[issue3451] Asymptotically faster divmod and str(long)

2008-07-26 Thread Facundo Batista
Changes by Facundo Batista <[EMAIL PROTECTED]>: -- nosy: +marketdickinson ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-lis

[issue3451] Asymptotically faster divmod and str(long)

2008-07-26 Thread Fredrik Johansson
New submission from Fredrik Johansson <[EMAIL PROTECTED]>: A few weeks ago, I blogged about taking advantage of Karatsuba multiplication and Newton's method to divide big integers quickly (some of you may have read it, as it was posted to Daily Python-URL among other places): http://fredrik-j.bl

[issue3449] Update decimal module to version 1.68 of the IBM specification

2008-07-26 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: The patch looks great, feel free to apply it and commit. For the record: the name issue that Mark talked about is not in this last change, it was before, and we handled it the way we now decide (hey, at least we're coherent with ourselves, ;

[issue3437] robotparser.py missing one line

2008-07-26 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: committed as r 65255. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3421] Test failure in test_math::testSum

2008-07-26 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The tests at floating point boundaries should probably be removed and their behavior should be left undefined. -- nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]>

[issue3353] make built-in tokenizer available via Python C API

2008-07-26 Thread Andy
Andy <[EMAIL PROTECTED]> added the comment: Did that and it builds fine. So my test procedure was: - checkout clean source - apply patch as per guidelines - remove the file Psrser/tokenizer.h (*) - ./configure - make - ./python setup.py install Build platform: Ubuntu , gcc 4.2.3 All wor

[issue1064] Test issue

2008-07-26 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: A new message for spambayes ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-lis

[issue3421] Test failure in test_math::testSum

2008-07-26 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Strangely, it seems to work now with 3k too -- both in a debug and release build. I've no idea what changed, but I'll close this for now. -- resolution: -> works for me status: open -> closed ___ Py

[issue3421] Test failure in test_math::testSum

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Thanks. Those are the results I'd expect on x86. So here's the puzzle: On lines 658-9 of Lib/test/test_math.py, in revision 65248 of the py3k branch, there's a pair of lines that looks like: if 1e16+2.999 != 1e16+2.:

[issue1446] Link to call me for free

2008-07-26 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue3139] bytearrays are not thread safe

2008-07-26 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > (1) are you sure it is safe not to INCREF the obj pointer in the > Py_buffer? Yes, that's the semantics of the current buffer interface, and I cannot see a flaw in it. When you call getbuffer, you certainly hold a reference, and it is your

[issue3356] some tests fail with Py_DEBUG (test_distutils, test_set)

2008-07-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Py_REFCNT simply drops their refcount field to -1 without bothering. I meant Py_DECREF. -- components: +Tests type: behavior -> crash ___ Python tracker <[EMAIL PROTECTED]>

[issue3356] some tests fail with Py_DEBUG (test_distutils, test_set)

2008-07-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hmm, ok. I was using `make EXTRA_CFLAGS="-DPy_DEBUG"`, but it wouldn't undefine NDEBUG so the assert() macro wouldn't be enabled. By using `make EXTRA_CFLAGS="-DPy_DEBUG -UNDEBUG"` instead it's fine. But that makes test_c_api in setobject.c b

[issue3450] Buy stocks now to make money

2008-07-26 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3450] Buy stocks now to make money

2008-07-26 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue3450] Buy stocks now to make money

2008-07-26 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10989/unnamed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3437] robotparser.py missing one line

2008-07-26 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Attached is a patch against 2.6 which adds the missing line (state = 2), a comment describing the three states the parser can be in and expands the test cases to cover this change (fail without it, pass with it). In the process I snagged s

[issue3450] Buy stocks now to make money

2008-07-26 Thread Nobody/Anonymous
New submission from Nobody/Anonymous: Your wife says his bed skills are better than yours http://kwhgs.ca/topnews.html -- files: unnamed messages: 70297 nosy: nobody severity: normal status: open title: Buy stocks now to make money Added file: http://bugs.python.org/file10989/unnamed __

[issue3421] Test failure in test_math::testSum

2008-07-26 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Both trunk and 3k give this: >>> 1e16 + 2. 10004.0 >>> 1.7976931348623157e+308 + 9.979201547673598e+291 inf ___ Python tracker <[EMAIL PROTECTED]> _

[issue2819] Full precision summation

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Here's a patch giving an alternative implementation of math.fsum; it's based on Tim Peter's suggestions, works mostly with integer arithmetic, and so bypasses problems with double rounding and extended precision floats. The patch is experi

[issue3421] Test failure in test_math::testSum

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: See also issue 2819 for ongoing discussion, and issue 2937, which is the likely root cause of the current difficulties with math.sum. ___ Python tracker <[EMAIL PROTECTED]>

[issue3421] Test failure in test_math::testSum

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Sadly, this is not the only problem with math.sum on x86 hardware right now. I'd guess that this is another problem related to double-rounding and the use of 80-bit floating-point registers on x86. Raymond and I are still actively looking

[issue3449] Update decimal module to version 1.68 of the IBM specification

2008-07-26 Thread Mark Dickinson
Changes by Mark Dickinson <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file10987/issue3449.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3449] Update decimal module to version 1.68 of the IBM specification

2008-07-26 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Looks like the changes needed here are even more minor than I thought. The decimal module already does the right thing with respect to the new specification and the new tests. So all that needs doing is to replace the old tests with the new

[issue3441] Regression in "module as a script" command-line option

2008-07-26 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: If I recall correctly (it's been a while), the breakages were tied in with relative imports - probably something like explicit relative imports not working at all, and implicit relative imports appearing to work, but resulting in incorrect modul