[issue12005] modulo result of Decimal differs from float/int

2011-05-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue12005> ___ ___ Python-

[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-05-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Brett, can you test this? -- assignee: -> brett.cannon nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issu

[issue11163] iter() documentation code doesn't work

2011-05-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker <http://bugs.python.org/issue11163> ___ ___ Python-bugs-list mai

[issue11163] iter() documentation code doesn't work

2011-05-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll replace this with a better example using binary chunked reads that terminate with an empty string. -- priority: normal -> low ___ Python tracker <http://bugs.python.org

[issue12001] Extend json.dumps to handle N-triples strings

2011-05-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Feature creep would not be good for the json module. -- ___ Python tracker <http://bugs.python.org/issue12001> ___ ___ Pytho

[issue11910] test_heapq C tests are not skipped when _heapq is missing

2011-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Are you sure those tests are C specific? Please be careful about doing unnecessary complexification of this module's tests. -- assignee: ezio.melotti -> rhettinger nosy: +rhettinger ___ Python tracke

[issue12027] Optimize import this (patch to make it 10x faster)

2011-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Move on, nothing to see here ;-) -- resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue11910] test_heapq C tests are not skipped when _heapq is missing

2011-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm imagining a cleaner testing style, like this: class TestHeap(unittest.TestCase): def test_nsmallest(self): self.assertEqual(heapq.nsmallest(3, range(10)), [0,1,2]) ... @test_support.requires('_heapq

[issue11910] test_heapq C tests are not skipped when _heapq is missing

2011-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Some of the tests were incorrectly marked as being C specific. I've fixed that on the 2.7 branch. Re-assigning back to Ezio. Overall, I don't think the current approach to testing both paths is elegant. Is there some alternative approach

[issue11910] test_heapq C tests are not skipped when _heapq is missing

2011-05-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching a rough draft of a way to simplify dual path testing. The idea is that the suite shouldn't have to be rewritten with self.module.heapify(...) references throughout. Instead, tests are written normally and the only thing that changes i

[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for increasing the number of random characters to 8 -1 for restoring uppercase letters -- ___ Python tracker <http://bugs.python.org/issue12

[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please don't make these kind of changes. Guido has been clear that the docs need to affirmatively state what the language does. Except for certain security risks or segfault risks, the docs should avoid wording along the lines of "fe

[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The tutorial is meant for newcomers. The experience needs to be positive and not leave the reader with worries that something bad will happen if they make a misstep. People commonly use the tutorial to evaluate the language as a whole. The tutorial

[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other stylistic note. The tone of the tutorial (and all the docs) needs to be respectful of the readers intelligence. We don't presume that the readers are stupid. We lay out the relevant information, show motivating use cases, provide glo

[issue12047] Expand the style guide

2011-05-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: georg.brandl components: Documentation files: style.diff keywords: patch nosy: georg.brandl, rhettinger priority: normal severity: normal status: open title: Expand the style guide Added file: http://bugs.python.org/file21951/style.diff

[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: See http://bugs.python.org/issue12047 -- ___ Python tracker <http://bugs.python.org/issue11948> ___ ___ Python-bugs-list m

[issue12047] Expand the style guide

2011-05-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: > there's a "talk down them" which looks funny to me in this word order. It was missing a word. Should be "talk down to them". Thanks for spotting this -- I fix it in the commit. > One question: I could imagine wording

[issue12047] Expand the style guide

2011-05-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12047> ___ ___ Python-bugs-

[issue11949] Make float('nan') unorderable

2011-05-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: > On the issue itself, I'm -1 on making comparisons > with float('nan') raise: I don't see that there's > a real problem here that needs solving. > > Note that the current behaviour does *not* violate IEEE 754,

[issue11957] re.sub confusion between count and flags args

2011-05-14 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue11957> ___ ___ Python-bugs-list mai

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue11610> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12080] decimal.py: performance in _power_exact

2011-05-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue12080> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12079] decimal.py: TypeError precedence in fma()

2011-05-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker <http://bugs.python.org/issue12079> ___ ___ Python-bugs-list mailing list Un

[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: lukasz.langa -> rhettinger ___ Python tracker <http://bugs.python.org/issue12086> ___ ___ Python-bugs-list mai

[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a venerable section of the tutorial that has been exposed to many, many readers and AFAICT it has never caused a problem. So, I see no need to make a change to it. Also as Georg points out, the docs (especially the tutorial) are not about

[issue12077] Harmonizing descriptor protocol documentation

2011-05-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue12077> ___ ___ Python-

[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue12028> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11986] Min/max not symmetric in presence of NaN

2011-05-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker <http://bugs.python.org/issue11986> ___ ___ Python-bugs-list mailing list Un

[issue8796] Deprecate codecs.open()

2011-05-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue8796> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11949] Make float('nan') unorderable

2011-05-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker <http://bugs.python.org/issue11949> ___ ___ Python-bugs-list mailing list Un

[issue12146] Possible bug in 're' documentation example

2011-05-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue12146> ___ ___ Python-bugs-list mai

[issue4113] Add custom __repr__ to functools.partial

2010-11-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Looks like a reasonable proposal, but coding this in C is a chore. It's not that bad. Most C code is a bit of a chore compared to Python but it really doesn't take much to write a C equivalent of: "functools.partial(%r, %s)"

[issue10356] decimal.py: hash of -1

2010-11-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: The choice between ValueError and TypeError can sometimes be ambiguous and seem arbitrary and I understand why you're gravitating towards ValueError (because it works some values and not others), but in this case the API is already fixed by what

[issue10356] decimal.py: hash of -1

2010-11-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: skrah -> rhettinger ___ Python tracker <http://bugs.python.org/issue10356> ___ ___ Python-bugs-list mailing list Un

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Yes, hex numeral would be more accurate than hex digit. Stick with hex digit. We've used that phraseology for a long time. See string.hexdigits for example. And "hex numeral" just sounds weird -- it makes me do a double-take to see

[issue10461] Use with statement throughout the docs

2010-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Do not change the examples in collections.rst. That would interfere with the clarify of what is being demonstrated. For example, the hamlet.txt example is not about file reading, it about counting words. -- nosy: +rhettinger

[issue10461] Use with statement throughout the docs

2010-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the other (non collections patches) are fine. The change doesn't break up the flow of the text. -- ___ Python tracker <http://bugs.python.org/is

[issue10461] Use with statement throughout the docs

2010-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Separate note for Éric: the try/finally examples do not need to change. Those are valid python. Users need to learn both try/finally and the with-statement. -- assignee: d...@python -> rhettinger ___ Pyt

[issue9746] All sequence types support .index and .count

2010-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Patch is fine. Go ahead and apply. -- nosy: +rhettinger resolution: -> accepted ___ Python tracker <http://bugs.python.org/iss

[issue10476] __iter__ on a byte file object using a method to return an iterator

2010-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, an idiom I use in Py2.x is: for block in iter(partial(f.read, BLKSIZ), ''): . . . This works with both single bytes at time and multiple bytes at a time. -- nosy: +rhettinger ___ Pyth

[issue9909] request for calendar.dayofyear() function

2010-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: "We already got one, and it's very nice-a" ISTM, this should be done with regular date arithmetic in the datetime module. >>> date(1964, 7, 31) - date(1963, 12, 31) datetime.timedelta(213) I don't see why we need a new functio

[issue7770] sin/cos function in decimal-docs

2010-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Added a comment to the docstring. See r86631. -- ___ Python tracker <http://bugs.python.org/issue7770> ___ ___ Python-bug

[issue7770] sin/cos function in decimal-docs

2010-11-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue7770> ___ ___ Python-bugs-

[issue10488] Improve documentation for 'float' built-in.

2010-11-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: d...@python -> mark.dickinson resolution: -> accepted ___ Python tracker <http://bugs.python.org/issue10488> ___ __

[issue1560032] confusing error msg from random.randint

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, it's time to close this one. The code is not buggy, it is documented as being a bound method and that is a perfectly acceptable python coding style to use bound methods as callables. It's also been around for a *very* long without caus

[issue10461] Use with statement throughout the docs

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Éric, please apply most of these. In the atexit patch, the first change is wrong. Change it to a try/except/finally or skip it altogether. In the collections patch, only include the change for the tail example; the other two should remain unchanged

[issue10356] decimal.py: hash of -1

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Committed the ValueError in r86517 (py3k) As discussed on IRC, I've reverted this change. -- resolution: fixed -> invalid status: open -> closed ___ Python tracker <http://bugs.pyth

[issue9802] Document 'stability' of builtin min() and max()

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: As discussed with Mark, am closing this one after having applied documentation changes. -- resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue5353] Improve IndexError messages with actual values

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm abandoning this one since I couldn't find a way to do it that didn't impair performance. Unlike C++, it is not uncommon in Python to use exceptions such as IndexError for control flow. There was too little added value in building-out

[issue6722] collections.namedtuple: confusing example

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: See r86650 -- resolution: -> fixed status: open -> closed versions: -Python 2.6, Python 2.7, Python 3.0, Python 3.1 ___ Python tracker <http://bugs.python.org/

[issue7212] Retrieve an arbitrary element from a set without removing it

2010-11-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue7212> ___ ___ Python-bugs-list mailing list Unsubscri

[issue7257] Improve documentation of list.sort and sorted()

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: After more thought, am leaving the doc strings as-is. They are succinct and accurate. I have updated the sorting how-to to more thoroughly cover the basics of sorting. -- resolution: -> wont fix status: open ->

[issue3292] Position index limit; s.insert(i,x) not same as s[i:i]=[x]

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Added the i,j,k notes Left out the processor word size and C-type specifications in-part because it is an implementation detail subject to change. Another reason is that it doesn't apply to necessarily to all sequences. Slices take arbitrary ob

[issue3292] Position index limit; s.insert(i,x) not same as s[i:i]=[x]

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: See r3292. -- ___ Python tracker <http://bugs.python.org/issue3292> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7049] decimal.py: Three argument power issues

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for deprecating three-arg pow for the reasons given. A user is much better-off composing well-defined operations than using our short-cut, with our chosen assumptions. Apologies for taking so long to think this one through. -- assignee

[issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Rejecting this one for reasons we discussed earlier. The assertEqual() method needs to be the primary interface. Everything else is starting to mix content and presentation (i.e. passing in separators). The existing repr() works fine with bytes and

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't have any other insights on this one. Assigned by to Antoine who appears to have put some thought into it. -- assignee: rhettinger -> pitrou ___ Python tracker <http://bugs.python.org

[issue7434] general pprint rewrite

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Deferring the general rewrite until 3.3. It would need to have a lot of people look at it and evaluate it. I no longer think there is time for that before the 3.2 beta. -- resolution: -> later versions: +Python 3.3 -Python

[issue10366] Remove unneeded '(object)' from 3.x class examples

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: These mostly look good. Do leave the howto documents as-is. They have some value across multiple versions of Python. Also, the descriptor how-to in particular gets some benefit from keeping (object) explicit because it helps remind users which version

[issue10138] calendar module does not support years outside [1, 9999] range

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Go ahead an remove the word "indefinitely". -- ___ Python tracker <http://bugs.python.org/issue10138> ___ ___

[issue5150] IDLE to support reindent.py

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Opened back up for the new patch (posted after the previous close). -- status: closed -> open ___ Python tracker <http://bugs.python.org/iss

[issue10461] Use with statement throughout the docs

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I’m not 100% sure I should change 'r' to 'rb' in logging: > It’s unrelated to with, and the rest of the file > has not been checked for similar errors. Good catch. This should only be a with-statement transformation

[issue9915] speeding up sorting with a key

2010-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the revisions and timing updates. I'm heartened that the common-case of sorting without a key function isn't negatively impacted. That result is surprising though -- I thought the concept was manipulate the key and value arrays a

[issue9915] speeding up sorting with a key

2010-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If the "key" parameter was not used, then the values pointer > is a null pointer. . . . > Since the branch will always be the same throughout any given > call to sort(), CPU branch prediction is effective making the > branch

[issue10511] heapq docs clarification

2010-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: That looks fine. Perhaps s/trees/binary trees -- assignee: rhettinger -> georg.brandl ___ Python tracker <http://bugs.python.org/issu

[issue10516] Add list.clear() and list.copy()

2010-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido approved these both in a thread earlier this year. The reasoning for copy() was the same as for clear(), some folks couldn't cope with: b = a[:] -- nosy: +rhettinger title: Add list.clear() -> Add list.clear() and l

[issue10519] setobject.c no-op typo

2010-11-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker <http://bugs.python.org/issue10519> ___ ___ Python-bugs-list mailing list Un

[issue10519] setobject.c no-op typo

2010-11-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Try to match the whitespace convention of the surrounding code. -- assignee: rhettinger -> anthonybaxter nosy: +anthonybaxter resolution: -> accepted ___ Python tracker <http://bugs.python.org/i

[issue10519] setobject.c no-op typo

2010-11-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: A few lines later, a similar change can be made for set_discard. -- assignee: anthonybaxter -> arigo ___ Python tracker <http://bugs.python.org/issu

[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: lukasz.langa -> rhettinger nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue10533> ___ ___ Python-

[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > It would be very handy to allow for concrete values as well. Do you have use cases for a concrete integer value that isn't zero? Since we can currently use defaultdict(int) or defaultdict(tuple), is the purpose just to create a more direct spe

[issue10533] Need example of using __missing__

2010-11-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Łukasz Langa] > __missing__ didn't appear to be the one obvious way to anyone. Two thoughts: * There is part of the Zen that says that way may not be obvious unless your Dutch. In this case, __missing__ was the API designed by Guido to ha

[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-11-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: michael.foord -> rhettinger ___ Python tracker <http://bugs.python.org/issue10242> ___ ___ Python-bugs-list mai

[issue10273] Clean-up Unittest API

2010-11-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: After discussion with Michael and Guido, am limiting this to: * Fixing assertItemsEqual as described in issue10242 * Moving the docs for type specific equality methods inside the docs for assertEqual to emphasize that those get dispatched automatically

[issue10273] Clean-up Unittest API

2010-11-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yes, all the variants of RegexpMatches --> Regex No, on deprecations. Just add a new alias and note in the docs that the oldname is obsolete. Naming deprecations cause too much trouble for too little bene

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mark, can you opine on this? -- assignee: belopolsky -> lemburg ___ Python tracker <http://bugs.python.org/issu

[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Applied in r86828. The output could still be made nicer, perhaps something along the lines of: expected 6, got 4: 'wand of fireballs' expected 2, got 7: 'ring of invisibility' . . . -- priority: high -> norma

[issue10544] yield expression inside generator expression does nothing

2010-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Hmm, what an interesting and unexpected side-effect of the efforts to hide the loop induction variable. -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue10

[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching possible code for nicer output. -- assignee: rhettinger -> michael.foord resolution: fixed -> Added file: http://bugs.python.org/file19833/nice_output.diff ___ Python tracker <http://bugs.p

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: I suggest Py_UNICODE_ADVANCE() to avoid false suggestion that the iterator protocol is being used. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10565] isinstance(x, collections.Iterator) can return True, when x isn't iterable

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: > A possible solution could be in > collections.Iterator.__subclasshook__ > checking for both required methods. That makes sense. PEP 234 requires iterators to support both methods. -- assignee: ->

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: This discussion should probably be moved to python-dev. With tools like Twisted's inlineDefer or the Monocle package, there is a growing need to be able to use yield in complex expressions. Yet, that goes against the trend toward making lists comps

[issue3243] Support iterable bodies in httplib

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Instead of hasattr(str,'next') consider using isinstance(str, collections.Iterable) Also consider changing the variable name from the now overly type specific, "str" to something like "source" to indicate the sign

[issue5150] IDLE to support reindent.py

2010-11-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ned.deily nosy: +ned.deily ___ Python tracker <http://bugs.python.org/issue5150> ___ ___ Python-

[issue10273] Clean-up Unittest API

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ezio, please do the regexp-->regex changes and move the tests under Lib/test. -- assignee: rhettinger -> ezio.melotti ___ Python tracker <http://bugs.python.org/i

[issue10565] isinstance(x, collections.Iterator) can return True, when x isn't iterable

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed in r86857. Needs backport. -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue10565> ___ ___

[issue10572] Move unittest test package to Lib/test

2010-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Of those, it makes the most sense to move the json tests to Lib/tests. Bob is not externally maintaining the 3.x version. It's all our now. Also, it looks like importlib is in a maintenance mode now. There is merit to keeping 2to3, ctypes, sqlite

[issue5863] bz2.BZ2File should accept other file-like objects.

2010-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Without a patch and compelling use cases, this has no chance. Recommend closing. -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue5

[issue10565] isinstance(x, collections.Iterator) can return True, when x isn't iterable

2010-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Alexander, do you want to take care of the backport? -- assignee: rhettinger -> belopolsky nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issu

[issue8743] set() operators don't work with collections.Set instances

2010-11-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg117005 ___ Python tracker <http://bugs.python.org/issue8743> ___ ___ Python-bug

[issue10323] Final state of underlying sequence in islice

2010-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed in r86874. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue10586] Enhanced cache access API for functools.lru_cache

2010-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, go ahead with the second patch. With the following changes: _CacheInfo = namedtuple("CacheInfo", "maxsize size hits misses") Change the variable names: cache_hits --> hits cache_misses --> misses

[issue10586] Enhanced cache access API for functools.lru_cache

2010-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thx -- ___ Python tracker <http://bugs.python.org/issue10586> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7830] Flatten nested functools.partial

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Alexander, I don't see anything wrong with patch, nor anything compelling about it either. It's your choice whether or not to apply. -- ___ Python tracker <http://bugs.python.

[issue8685] set(range(100000)).difference(set()) is slow

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thx. -- assignee: rhettinger -> pitrou resolution: -> accepted ___ Python tracker <http://bugs.python.org/

[issue9915] speeding up sorting with a key

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 on the basic idea of moving elements in the keys and values arrays at the same time thereby eliminating the fragmented memory overhead of the sortwrapper indirection. I would like the patch to be restricted to just that change. The other tweaks are

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Deferring to 3.3. -- priority: normal -> low versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue6422] timeit called from within Python should allow autoranging

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: This does not conflict with the other proposed changes to timeit and it is in-line with Guido's desire that to expose useful parts currently buried in the command-line logic. Amaury, you've shown an interest. Would you like t

[issue6594] json C serializer performance tied to structure depth on some systems

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Antoine, what do you want to do with the one? Without a good test case the OP's original issue is undiagnosable. -- assignee: rhettinger -> pitrou versions: +Python 3.1 ___ Python tracke

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Any new logic should make maximum use of existing tools: def __isub__(self, other) if len(other) > len(self)*8: other = self & other . . . # rest of isub unchanged -- stage: patch review -> n

<    5   6   7   8   9   10   11   12   13   14   >