[issue3051] heapq change breaking compatibility

2008-06-11 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: There should be no cases where the pure python code runs instead of the C code. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue643841] New class special method lookup change

2008-06-11 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The name Proxy seems too vague. This class is all about targeted delegation. Am curious, has this been out as a recipe; has it been used in combat yet? -- nosy: +rhettinger ___

[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Attaching a version that's a little faster and cleaner with PySequence_Fast_ITEMS. -- nosy: +rhettinger Added file: http://bugs.python.org/file10596/namedparam3.patch ___ Pyt

[issue3008] Let bin() show floats

2008-06-11 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Saving this for after the first beta goes out. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1819] Speed hack for function calls with named parameters

2008-06-12 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Georg, do you want to go ahead and apply this. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1569291] Speed-up in array_repeat()

2008-06-12 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Georg, do you want to take it from here. -- assignee: rhettinger -> georg.brandl nosy: +georg.brandl ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2493] Remove unused constants from optimized code objects

2008-06-12 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The issue with unused constants is an artifact of the peepholer running after the bytecode generation phase. When constant folding was written, I intentionally left-out a step to remove unused constants because of the code comp

[issue3116] Fix quadratic behavior for marshal.dumps() when len>32Mb

2008-06-15 Thread Raymond Hettinger
New submission from Raymond Hettinger <[EMAIL PROTECTED]>: Martin, can you give this a second review? See original discussion at: http://groups.google.com/group/comp.lang.python/browse_thread/thread/ac8 f121c5d043198# Patch replaces constant size over-allocation with the amortized

[issue3056] Simplify the Integral ABC

2008-06-15 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10634/numbers3.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3056] Simplify the Integral ABC

2008-06-15 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Not much feedback on comp.lang.python. Does numbers3.diff look like what you had in mind? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3116] Fix quadratic behavior for marshal.dumps() when len>32Mb

2008-06-15 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Applied in r64303. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue1792] o(n*n) marshal.dumps performance for largish objects with patch

2008-06-15 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Amended this fix to avoid quadratic behavior altogether. See issue 3116. -- nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2610] string representation of range and dictionary views

2008-06-17 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I'm also -1 on the patch and think it is the wrong solution. Efforts should probably be directed at hooking the output of the interactive interpreter. We already have code that suppresses None return values and assigns

[issue3056] Simplify the Integral ABC

2008-06-17 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Jeffrey, do you have an interest in taking it from here? -- assignee: rhettinger -> jyasskin nosy: +jyasskin ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3078] tokenize.py improvements

2008-06-17 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Sorry, I don't see any value in this kind of patch. The line "contline = += line" is broken. The "+=" transformations and else-clause eliminations trivially re-arrange code without any real savings

[issue1778443] robotparser.py fixes

2008-06-17 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: These changes mostly look fine but shouldn't go it until after the beta. This is really the wrong time in the release cycle to be making minor spacing changes and making it harder to get a meaningful "svn ann".

[issue3056] Simplify the Integral ABC

2008-06-17 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: No problem. Whatever you think is best. Still hoping that Jeffrey can take a look at the mixin approach and the __rand__ logic. No one else seems to have an interest and I won't have time to write the tests for a few day

[issue3008] Let bin() show floats

2008-06-19 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: To address the ideas brought-up so far, here's a new version that can work with eval. The same appoach extends to oct and hex as well: def newbin(f): """ >>> newbin(3.125) &#x

[issue3008] Let bin() show floats

2008-06-19 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10664/floatdisp.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3008] Let bin() show floats

2008-06-19 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10666/float.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3008] Let bin() show floats

2008-06-19 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10667/float2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The other reviewers asked for: * same treatment for oct() and hex() * platform independent exact representation of floats * fixed-size exponential style output instead of tons of leading zeros * output that round-trips through eval()

[issue3004] Bug in slice.indices()

2008-06-20 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: marketdickinson -> rhettinger nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Hmm, I don't see a way to preserve -0.0 without varying from the standard format. Attaching an updated patch for Amaury's comments. Added file: http://bugs.python.org/file10673/float4.diff __

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10674/float5.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Mark, I added tests for Inf/Nan. Will this work on all platforms? Added file: http://bugs.python.org/file10675/float5.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10674/float5.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3004] Bug in slice.indices()

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Looks like a straight-forward patch. -- assignee: rhettinger -> marketdickinson resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3152] ast module docs document private attribute

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: This is consistent with the methods in named tuples (also to avoid name clashes). -- components: +None keywords: +26backport nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTE

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Applied in r64438 -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3051] heapq change breaking compatibility

2008-06-22 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3051> ___ __

[issue3069] Let set.union and set.intersection accept multiple arguments

2008-06-22 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3069> ___ __

[issue1746088] long.__str__ is quadratic time

2008-06-22 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Still waiting for the patch. -- assignee: rhettinger -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1003935] xrange overflows

2008-06-22 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: This was fixed for Py3.0. No interest was shown in backporting. -- resolution: -> out of date status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3161] Missing import for sys in _abcoll

2008-06-22 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Applied in r64475 . Thanks for the patch. -- resolution: -> accepted status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3189] Py3k DeprecationWarning in difflib

2008-06-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Applying a minimal version of this patch -- changing has_key() to __contains__(). See r64511. -- nosy: +rhettinger resolution: -> accepted status: open -> closed ___ Python tra

[issue1394] simple patch, improving unreachable bytecode removing

2008-06-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Recommend rejecting. Too much work for zero performance payoff. -- assignee: rhettinger -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3008] Let bin() show floats

2008-06-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Re-opening for further discussion. -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

[issue3008] Let bin/oct/hex show floats

2008-06-24 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: rhettinger -> gvanrossum nosy: +gvanrossum title: Let bin() show floats -> Let bin/oct/hex show floats ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3008] Let bin/oct/hex show floats

2008-06-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Updating patch so that the global symbol starts with _Py. Added file: http://bugs.python.org/file10726/float7.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[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 &l

[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]> <http://bugs.pytho

[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]> <http://bugs.pytho

[issue3008] Let bin/oct/hex show floats

2008-06-26 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Add support for non-float floats. Added file: http://bugs.python.org/file10742/float8.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3154] "Quick search" box renders too long on FireFox 3

2008-06-27 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Running FF3.0 on Windows it looks fine at various font sizes. Maybe this is unique to the Ubuntu build. Also, I looked at the style sheet and didn't see anything odd. -- nosy:

[issue3081] Py_(X)SETREF macros

2008-06-28 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: -1 on the new macros. The mnemonic doesn't work for me and the example code fragments are to my eyes less readable than before. These add to the learning curve for reading and writing C extensions and provide nearly ze

[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Will get this fixed-up. -- priority: -> high ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Fixed. See r64577 Thanks for the report. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE?

2008-06-28 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: That one is technically okay because "seq" really is a set. But I'm okay with you changing it anyway. It would be nice to see Py_SIZE used everywhere in preference to the type specific versio

[issue3008] Let bin/oct/hex show floats

2008-06-30 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I'm looking forward to your C implementation. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3263] Odd code fragment in ABC definitions

2008-07-02 Thread Raymond Hettinger
New submission from Raymond Hettinger <[EMAIL PROTECTED]>: In the Hashable ABC, there is a peculiar code fragment: if "__hash__" in B.__dict__: if B.__dict__["__hash__"]: return True break

[issue3263] Odd code fragment in ABC definitions

2008-07-02 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I don't think we should build in explicit support for bad designs that violate the Liskov substitution principle. Are there any valid use cases for wanting non-hashable subclasses of hashable classes? If for some reason, t

[issue3008] Let bin/oct/hex show floats

2008-07-03 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Mark, I'm tied-up with EuroPython until the 14th. Do you have time to take a crack at this? -- assignee: rhettinger -> marketdickinson ___ Python tracker <[EMAIL

[issue3285] Fraction.from_any()

2008-07-04 Thread Raymond Hettinger
New submission from Raymond Hettinger <[EMAIL PROTECTED]>: After exercising the fractions module, I've found it problematic that there isn't a unified constructor to handle mixed data input types. For example, when updating the accurate summation recipe at http://aspn.acti

[issue3287] Fraction constructor should raise TypeError instead of AttributeError

2008-07-04 Thread Raymond Hettinger
New submission from Raymond Hettinger <[EMAIL PROTECTED]>: >>> from fractions import * >>> Fraction(3.1) Traceback (most recent call last): File "", line 1, in Fraction(3.1) File "C:\Python26\lib\fractions.py", line 100, in __new__ nume

[issue3287] Fraction constructor should raise TypeError instead of AttributeError

2008-07-04 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file10811/fractype.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3301] DoS when lo is negative in bisect.insort_right() / _left()

2008-07-06 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Don't think negative indices make much sense in this context. Will put in a test to raise a ValueError for negative indices. -- priority: -> high ___ Python tracker <[EMAIL

[issue3287] Fraction constructor should raise TypeError instead of AttributeError

2008-07-10 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Applied in r64835. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3329] API for setting the memory allocator used by Python

2008-07-10 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I think it is reasonable to get a macro definition change into 2.6. The OP's request is essential for his application (running Python on Nokia phones) and it would be a loss to wait two years for this. Also, his request for a

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-07-10 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: rhettinger -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1700288> ___ _

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2008-07-10 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: rhettinger -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1568> ___ _

[issue3301] DoS when lo is negative in bisect.insort_right() / _left()

2008-07-10 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Fixed in 64845. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3332] DocTest and dict sort.

2008-07-10 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Closing as not a bug. FWIW, here's the relevant text from the docs: - 23.2.3.6 Warnings doctest is serious about requiring exact matches in expected output. If even a single charac

[issue3285] Fraction.from_any()

2008-07-10 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Adopted the solution used by functions in the math module. Functions that accept floats also accept integral inputs. This improves usability in face of mixed float/int data or decimal/int data. See r64846. -- reso

[issue3333] Need -3 warning for exec statement becoming a function

2008-07-10 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- nosy: rhettinger priority: high severity: normal status: open title: Need -3 warning for exec statement becoming a function versions: Python 2.6 ___ Python tracker <[EMAIL PROTECTE

[issue3333] Need -3 warning for exec statement becoming a function

2008-07-11 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3288] float.as_integer_ratio method is not documented

2008-07-11 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: georg.brandl -> rhettinger nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3008] Let bin/oct/hex show floats

2008-07-13 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: So far this looks good. Will complete the review on the next leg of my flight (about 12 hrs). ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3106] speedup some comparisons

2008-07-14 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: -> rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3106> ___ _

[issue3354] Improve error reporting for the argument parsing API

2008-07-14 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I think this is closer to a language wide change and should probably be addressed for 2.7 and 3.1. It would be great to change the C argument parsing API to make its error messages more specific. For Py2.6, I think things are f

[issue3356] some tests fail in debug mode (test_distutils, test_set)

2008-07-14 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I'll look at the test_set failure if no one else gets to it first. -- nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3008] Let bin/oct/hex show floats

2008-07-14 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The patch looks good. I would coded hex_from_char() using a lookup into "0123456789abcdef" which uses no unpredicatable branches. Likewise, I would done hex_from_char() with a case statement (limiting the call to singl

[issue3356] some tests fail in debug mode (test_distutils, test_set)

2008-07-14 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I can't reproduce the error using Windows. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3008] Let bin/oct/hex show floats

2008-07-15 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Mark, please go ahead and apply so the buildbots will have time to give it a run on all the platforms before beta 2 is cut. Be sure to make Guido's edits to the Misc/NEWS entry. ___ Pyt

[issue3374] Bisect upgrades: key/cmp/reverse, parameterized handedness

2008-07-16 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Issues: 1. In Py3.0, the cmp argument has been dropped completely. It has been supplanted by the key function. 2. Previous feature requests for cmp/key/reverse have been rejected. The problem is that in a series of searc

[issue3412] Fraction and Decimal in the Tutorial

2008-07-18 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I'll build-out the discussion a bit and mention the new float.hex() and float.as_integer_ratio() methods. Will also add references to decimal and fractions. -- assignee: georg.brandl -> rhettinger nos

[issue2772] Add PendingDeprecationWarning for % formatting

2008-07-18 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I think this is premature until be know for sure that % formatting will in-fact be deprecated in Py3.1. Time will tell how well the new format options get accepted. Likewise, we'll learn more about how readily legacy c

[issue3417] make the fix_dict fixer smarter

2008-07-19 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: for k in d.keys(): return k # needs to return a list -- nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3417] make the fix_dict fixer smarter

2008-07-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: The example was mucked-up :( The question is that when for-looping over d.keys/items etc, how you know that the body of the loop isn't going to mutate the dict? ___ Python tracker <[E

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Since we're not in a hurry for Py2.7 and 3.1, I would like to this kicked around a bit on the newsgroup and in numpy forums (personally, I would also post a pure python equivalent to the ASPN cookbook for further commentary).

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: It would be nice if we knew the error bounds for each of the approximation methods. Do we know how the coefficients were generated? When switching from one method to another, it might be nice to have a range where the results

[issue3436] csv.DictReader inconsistency

2008-07-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I think this is the wrong approach. It would be better to have a separate getheader() method. Having __init__ do the deed is at odds with other uses of __init__ that only do setup but don't start reading. -- nosy:

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

2008-07-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I prefer your idea to expose PyLong_Numbits(). IMO, frexp() is very much a floating point concept and should probably remain that way. -- nosy: +rhettinger ___ Python tracker &

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

2008-07-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Another reason to leave frexp() untouched is that it is tightly coupled to ldexp() as its inverse, for a lossless roundtrip: assert ldexp(*frexp(pi)) == pi This relationship is bound to get mucked-up or confused if frexp

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

2008-07-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: numbers.Integral is already way too fat of an API. Am -1 on expanding it further. Recommend sticking with the simplest, least invasive, least pervasive version of your request, a numbits() method for ints. FWIW, in Py2.6 y

[issue3366] Add gamma and error functions to math module

2008-07-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Why isn't tgamma() simply named gamma()? The t prefix does nothing for me except raise questions. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1592] operations on closed shelves fail cryptically

2008-07-25 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: -> rhettinger nosy: +rhettinger versions: -Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue1592] operations on closed shelves fail cryptically

2008-07-25 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I'm working on this one. Alternate patch attached. The problem with the old one is that it slows down every access to the shelf and it prevents assignment to self.dict which has always been allowed. The new patch imp

[issue3366] Add gamma and error functions to math module

2008-07-25 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Can you also implement blending of approximations: (1-t)*f1(x) + t*f2 (x) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1592] operations on closed shelves fail cryptically

2008-07-25 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Fixed in r65233 -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

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

2008-07-25 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: -1 on renaming. I concur with Mark that we are under no obligation to match the names used in the spec -- only the functionality matters -- also we're already got a history of at least slightly different names. I also see n

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

2008-07-25 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: P.S. I also agree with Mark that the 1.68 update should be treated as a bugfix and go into the next beta, preferably as soon as possible. Facundo and I should both agree to give it a quick and thorough review so that the beta

[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 PROTECTE

[issue3458] dict.update() optimisation gives unexpected/invalid results when passed a subclass of DictType

2008-07-28 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Will look back in my notes. I believe this was previously discussed and rejected. -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http

[issue1242657] list(obj) can swallow KeyboardInterrupt

2008-07-28 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Georg's suggestion seems reasonable. Alternatively, you can just catch AttributeError or TypeError. Lowering the priority to normal and marking as unresolved. At some point, it would be nice to review the whole code bas

[issue3458] dict.update() optimisation gives unexpected/invalid results when passed a subclass of DictType

2008-07-28 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: This is duplicate of http://bugs.python.org/issue1615701 . The check_exact solution was attempted once but it broke code in a subtle and hard to find way so it had to be reverted. For your use case, try UserDict instead of subcl

[issue3473] In function call, keyword arguments could follow *args

2008-07-30 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: +1 for applying to 2.6. izip_longest() is a perfect example of where it's important. -- nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3474] Using functools.reduce() does not stop DeprecationWarning when using -3

2008-07-30 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Can't this be handled by 2-to-3 instead of a -3 warning? -- components: +2to3 (2.x to 3.0 conversion tool) -Library (Lib) nosy: +rhettinger ___ Python tracker <[EMAIL PRO

[issue1878] class attribute cache failure (regression)

2008-07-31 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Guido, what say you, live with it, revert it, or apply Py_TPFLAGS_HAVE_VERSION_TAG to all core types? -- assignee: arigo -> gvanrossum nosy: +gvanrossum, rhettinger ___ Python tracke

<    9   10   11   12   13   14   15   16   17   18   >