[issue2690] Precompute range length and enhance range subscript support

2010-12-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Doc change committed to py3k in r87346. Thanks, SilentGhost! I also committed r87349 to reverse r87162 (which was in the wrong branch). -- ___ Python tracker __

[issue2690] Precompute range length and enhance range subscript support

2010-12-11 Thread SilentGhost
SilentGhost added the comment: here is the patch for the py3k docs. -- Added file: http://bugs.python.org/file20021/stdtypes.rst.diff ___ Python tracker ___ _

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Nick Coghlan
Nick Coghlan added the comment: No, I believe it was added as part of the .index() and .count() implementation. Checking the source, there's definitely no sq_contains implementation in 3.1 or 2.7. -- ___ Python tracker

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is the in/not-in fast path in 2.7? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Nick Coghlan
Nick Coghlan added the comment: The other major change for ranges is that "in" and "not in" are no longer inefficient for actual instances of int (it does an arithmetic calculation instead of a linear search). -- ___ Python tracker

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Applied in r87162 -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread SilentGhost
SilentGhost added the comment: Not sure this worth a patch, to me it looks like a removal of a single word. But here it goes anyway. -- nosy: +SilentGhost Added file: http://bugs.python.org/file20003/stdtypes.rst.diff ___ Python tracker

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: The descriptions of range's limitations in the docs still needs an update. -- assignee: georg.brandl -> ncoghlan status: closed -> open ___ Python tracker ___

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Georg Brandl
Georg Brandl added the comment: I'm fine with it: as with the other changes for .count and .index, consistency with the protocols/ABCs the types are members of is not exclusively a new feature. -- status: open -> closed ___ Python tracker

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: (Oops, didn't mean to reclose this yet) I want to wait for Georg's verdict on including the functionality in 3.2 before stressing too much about correct documentation of it :) -- assignee: -> georg.brandl status: closed -> open ___

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > The descriptions of range's limitations there is no longer accurate > (slicing is supported following this patch and containment testing is > now efficient) Want to open a new issue for that? (or is there one already?) --

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Daniel Stutzbach pointed out that range() is also mentioned under: http://docs.python.org/dev/library/stdtypes.html#sequence-types-str-bytes-bytearray-list-tuple-range The descriptions of range's limitations there is no longer accurate (slicing is supported foll

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: On Sat, Dec 4, 2010 at 2:26 AM, Daniel Stutzbach wrote: > > Daniel Stutzbach added the comment: > >> (I also noticed that the new methods from issue #9213 are not mentioned >> in the range() docs > > Wasn't that fixed in Issue9746? Ah, I see what you mean. I wa

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > (I also noticed that the new methods from issue #9213 are not mentioned > in the range() docs Wasn't that fixed in Issue9746? -- ___ Python tracker ___

[issue2690] Precompute range length and enhance range subscript support

2010-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: I brought the patch up to date for the Py3k branch, but realised just before checking it in that it may run afoul of the language moratorium (since it alters the behaviour of builtin range objects). However, the .count() and .index() methods (along with the Seq