[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like everyone is in favor of the change. I'll apply the patch after adding some comments and tests. -- assignee: ncoghlan -> rhettinger ___ Python tracker <http://bugs.python.org

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Until and unless this gets fixed, perhaps we should document some sort of workaround. One possibility is attached. -- Added file: http://bugs.python.org/file20940/annotations_workaround.py ___ Python tracker

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg129664 ___ Python tracker <http://bugs.python.org/issue11333> ___ ___ Python-bug

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file20940/annotations_workaround.py ___ Python tracker <http://bugs.python.org/issue11333> ___ ___

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Until and unless this gets fixed, perhaps we should document some sort of workaround. One possibility is attached. -- Added file: http://bugs.python.org/file20941/annotations_workaround.py ___ Python tracker

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

2011-02-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch is fine. Do consider using assertIsNot() in the tests. Then go ahead and apply it. The OverflowError in bytearray.pop() is a bug, please open a separate report for it and make a patch changing it to IndexError. Assign that bug report to me

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

2011-03-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Hmm, shouldn't self.__class__(self) be a > good default implementation of copy()? > > I'd expect any sequence to support this way > of creation from another sequence, even if it's inefficient. The copy() method isn't

[issue9276] pickle should support methods

2011-03-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > how about we give every function a `.__parent_class__` > attribute saying which class it is a method of? Won't work. The same function can be used in multiple classes. The function object is independent of the class. This is conc

[issue9276] pickle should support methods

2011-03-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: This isn't worth introducing poorly thought out hacks. -- ___ Python tracker <http://bugs.python.org/issue9276> ___ ___

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is there a way to test this? -- ___ Python tracker <http://bugs.python.org/issue11335> ___ ___ Python-bugs-list mailin

[issue11381] pretending the "not" operator is a function behaves surprisingly

2011-03-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Georg. -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue11381> ___ ___ Python-bugs-list m

[issue11386] Fix exception thrown by bytearray.pop() for empty bytearrays

2011-03-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks fine. Please apply and backport. Also, please search all other pop() methods in the standard library to see if this bug occurred anywhere else. Popping from an empty container should be a LookupError, either IndexError for sequences or

[issue11388] Implement MutableSequence.clear()

2011-03-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: s/has to be/could be/ But yes, this would be a worthwhile addition to MutableSequence :-) -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue11

[issue11386] Fix exception thrown by bytearray.pop() for empty bytearrays

2011-03-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: Does Python 2.7 have an issue? -- ___ Python tracker <http://bugs.python.org/issue11386> ___ ___ Python-bugs-list mailin

[issue11388] Implement MutableSequence.clear()

2011-03-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please also update the table entry for MutableSequence in Doc/library/collections.abc.rst -- ___ Python tracker <http://bugs.python.org/issue11

[issue11344] Add height argument to os.path.dirname()

2011-03-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > My point was that unix hasn't found it useful > to add a level option to the dirname API. ISTM, that is a strong indication that this isn't needed in the form it has been proposed. > I don't know that I personally have ever had

[issue11412] Section numbers in the Library Reference have a trailing period

2011-03-05 Thread Raymond Hettinger
New submission from Raymond Hettinger : The section headings all look like this: 4.11. Other Built-in Types 4.11.1. Modules ... http://docs.python.org/dev/library/stdtypes.html#classes-and-class-instances It looks like there is one dot to many

[issue11412] Section numbers in the Library Reference have a trailing period

2011-03-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: > This looks fine to me -- isn't it a mere stylistic issue? It must be. I just checked several of the books on my shelf. Most don't have the trailing period, but Knuth does. I raised the issue because I thought it was

[issue11422] indentation problem in if, elif, else statements

2011-03-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: In both cases, if-clause and the else-clause are at the beginning of the line (from Python's point of view). The difference is that the Python command line interpreter adds a "..." to the beginning of secondary lines. That makes the else-

[issue11425] Cleanup sample codes in tutorial.

2011-03-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, but I think many of these changes should not be made. Sometime the tight spacing is used for visual grouping. The following look fine and should not be changed because adding spaces around the + or * operator makes the whole sentence harder to

[issue11462] Peephole creates duplicate and unused constants

2011-03-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Eugene, but I'm not willing to add that much complexity to save a few bytes. This was a known issue and long ago we choose to leave it as-is. In the future when constant folding is done at the AST level, we'll get more extensive optimiz

[issue11462] Peephole creates duplicate and unused constants

2011-03-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm disinclined to accept this patch. There is only minor space savings and no actual speed-up. When constant folding was introduced, a design decision was made to ignore the issue of orphan constants. The rationale behind that decision still s

[issue11462] Peephole creates duplicate and unused constants

2011-03-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +twouters -rhettinger ___ Python tracker <http://bugs.python.org/issue11462> ___ ___ Python-bugs-list mailing list Unsub

[issue11462] Peephole creates duplicate and unused constants

2011-03-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Eugene. As the person who designed, implemented, and maintains the peephole optimizer, I need to reject the patch. If better constant folding is wanted, the work needs to be done with AST, not with bytecode. I would welcome a patch. Thomas

[issue11244] Negative tuple elements produce inefficient code.

2011-03-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Eugene's patch looks like a correct fix to the regression. I'll review further in the next couple of days. Antoine, we need to further discuss your checkin to the peephole optimizer. I believe it was inappropriate. -- assignee: mark

[issue11462] Peephole creates duplicate and unused constants

2011-03-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please cease development of this patch. It has been rejected. The peephole optimizer should be considered somewhat off-limits at this point and any further development efforts directed at an AST optimizer. -- resolution: -> rejec

[issue7391] Re-title the "Using Backslash to Continue Statements" anti-idiom

2011-03-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I discussed this with Moshe today and he agreed that the document is out-of-date and should be removed. -- nosy: +moshez resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.p

[issue11489] json.dumps not parsable by json.loads (on Linux only)

2011-03-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: > We seem to be in the worst of both worlds right now > as I've generated and stored a lot of json that can > not be read back in This is unfortunate. The dumps() should have never worked in the first place. I don't think that loads(

[issue10617] Collections ABCs can’t be linked to

2011-03-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Georg, do you have a recommendation? -- assignee: docs@python -> georg.brandl nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issu

[issue11510] Peephole breaks set unpacking

2011-03-14 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +dmalcolm, pitrou, rhettinger priority: normal -> high ___ Python tracker <http://bugs.python.org/i

[issue11510] Peephole breaks set unpacking

2011-03-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like the steps for UNPACK_SEQUENCE should be skipped when following a BUILD_SET. I'll post a patch tomorrow (probably a one-liner). -- ___ Python tracker <http://bugs.python.org/is

[issue11510] Peephole breaks set unpacking

2011-03-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: See attached. -- keywords: +patch Added file: http://bugs.python.org/file21208/peep.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11510] Peephole breaks set unpacking

2011-03-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Eugene, thanks for noticing and reporting this. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: The suggested examples are misleading because they use 6.24 which is not exactly representable in binary floating point. Representation issues are orthogonal to the OP's issue which is really just a simple rounding example: >>> x =

[issue11582] Boilerplate code replaced in Python/ceval.c

2011-03-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 I think this will make the code harder to understand and maintain. -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue11

[issue11582] Boilerplate code replaced in Python/ceval.c

2011-03-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low versions: -Python 3.1, Python 3.2, Python 3.4 ___ Python tracker <http://bugs.python.org/issu

[issue11597] Can't get ConfigParser.write to write unicode strings

2011-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Now the question is, is this a bug > or would adding support be a feature? That may be a good question for python-dev. Since ConfigParser is a very old module, if there were a pressing need, we probably would have heard about it befo

[issue11597] Can't get ConfigParser.write to write unicode strings

2011-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: It's also a question of adding a feature to a point release. If dev's relied on the new feature, they would also have to test for version > 2.7.1. We usually try to avoid that (after a minor fiasco with booleans m

[issue11602] python-config code should be in sysconfig

2011-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue11602> ___ ___ Python-bugs-list mailing list Unsub

[issue11071] What's New review comments

2011-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: It seems no new issues have arisen. If something new comes-up, feel free to re-open. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue10042] total_ordering stack overflow

2011-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Éric, would you like to apply this to 2.7? -- assignee: rhettinger -> eric.araujo ___ Python tracker <http://bugs.python.org/issu

[issue11465] Set documentation: Link to wikipedia

2011-03-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with the other respondants. Also, experience has shown a near zero learning curve for sets. For whatever reason, people seem to just get it and not require further explanation. -- nosy: +rhettinger

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-03-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> high ___ Python tracker <http://bugs.python.org/issue11205> ___ ___ Python-bugs-list mailing list Un

[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > By the way, PyList_SetItem() already has an > abstract counterpart called PyObject_SetItem(), > so changing this one seems useless. The problem isn't a lack of available abstract functions. If some code uses PyObject_SetItem(), then it alr

[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm just pointing out a problem. Lots of existing code uses the concrete API and that code can break subclasses of builtin types (possibly resulting in segfaults). I don't really care what is done about it. I'm just observing that the cur

[issue10617] Collections ABCs can’t be linked to

2011-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks fine, but it may be better to put the tables first and details second. -- ___ Python tracker <http://bugs.python.org/issue10

[issue11625] Typo in collections.abc docs

2011-03-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for noticing this. -- nosy: +rhettinger priority: normal -> high ___ Python tracker <http://bugs.python.org/issu

[issue11628] cmp_to_key generated class should use __slots__

2011-03-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this is a good idea. Am not sure whether it should be backported though. -- assignee: -> rhettinger ___ Python tracker <http://bugs.python.org/issu

[issue11628] cmp_to_key generated class should use __slots__

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

[issue11625] Typo in collections.abc docs

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

[issue8420] Objects/setobject.c contains unsafe code

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks okay. On the first lines for set_merge() where there is: key = entry->key; also do: hash = entry->key; so that the two get handled in a parallel fashion. Thanks for doing the backporting. -- assignee: rhettinger -> er

[issue11244] Negative tuple elements produce inefficient code.

2011-03-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> mark.dickinson ___ Python tracker <http://bugs.python.org/issue11244> ___ ___ Python-bugs-list mai

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Daniel. -- resolution: -> accepted status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue11260] smtpd-as-a-script feature should be documented and should use argparse

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

[issue8420] Objects/setobject.c contains unsafe code

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: The revised patch looks good. Please make the same change for set_add_entry. If the tests run, go ahead and apply. -- ___ Python tracker <http://bugs.python.org/issue8

[issue10225] Fix doctest runable examples in python manual

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: These are fine except for the changes to collections.py. Please leave the deployed code for named tuple as-is. Doctest may have issues with trailing whitespace, but that is doctest's problem, not named tuple's. -- assignee:

[issue1479611] speed up function calls

2011-03-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> versions: +Python 3.3 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue1479611> ___ ___ Py

[issue10988] Descriptor protocol documentation for super bindings is incorrect

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed. Thanks for the bug report. -- resolution: -> fixed status: open -> closed versions: +Python 3.3 -Python 2.5, Python 2.6 ___ Python tracker <http://bugs.python.org/i

[issue8420] Objects/setobject.c contains unsafe code

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sure, go ahead and apply to 3.1 -- ___ Python tracker <http://bugs.python.org/issue8420> ___ ___ Python-bugs-list mailin

[issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate

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

[issue10771] descriptor protocol documentation has two different definitions of "owner" class

2011-03-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/i

[issue10610] Correct the float(), int() and complex() documentation

2011-03-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.1, Python 3.3 ___ Python tracker <http://bugs.python.org/i

[issue8420] Objects/setobject.c contains unsafe code

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Looks good. Can this be closed now? -- ___ Python tracker <http://bugs.python.org/issue8420> ___ ___ Python-bugs-list mailin

[issue7391] Re-title the "Using Backslash to Continue Statements" anti-idiom

2011-03-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker <http://bugs.python.org/issue7391> ___ ___ Python-bugs-list mailing list Unsubscri

[issue10978] Add optional argument to Semaphore.release for releasing multiple threads

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

[issue3056] Simplify the Integral ABC

2011-03-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low versions: +Python 3.3 -Python 2.6, Python 3.0 ___ Python tracker <http://bugs.python.org/iss

[issue4498] Compiler warning "signed/unsigned comparison in mmapmodule"

2011-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: I no longer have access to the compiler that emitted the warning. -- resolution: -> out of date status: open -> closed title: Compiler warning "signed/unsigned comparion in mmapmodule" -> Compiler warning "signed/unsigned

[issue11652] urlib2 returns a pair of integers as the content-length value

2011-03-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Interesting, the Content-Length header was sent twice: HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) Last-Modified: Sat, 07 Feb 2009 19:15:15 GMT ETag: "46aef-46258f510b6c0" Content-Length: 289519 Expires: Fri, 25 Mar 2011 17:32:49 GMT Co

[issue11477] Bug in code dispatching based on internal slots

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

[issue11661] test_collections.TestNamedTuple.test_source failing on many buildbots after f09f7ab40ce6

2011-03-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report. It looks like globals() contamination is happening on the buildbot that isn't happening locally. Isolated the test in commit 4f1cd92fe835 Will check the buildbots after to make sure it worked. Otherwise, will delete

[issue10225] Fix doctest runable examples in python manual

2011-03-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I am curious, what was the reason to add > trailing whitespace in the named tuple template? To make it hard to doctest ;-) I had a thought that it made the template more readable, but the better solution was to just use real newlines instead

[issue11666] Test pydoc to display full help for named tuples

2011-03-24 Thread Raymond Hettinger
New submission from Raymond Hettinger : Teach pydoc to find methods and attributes with leadings underscores in a named tuple. -- components: Library (Lib) files: pydoc.patch keywords: patch messages: 132055 nosy: rhettinger priority: normal severity: normal status: open title: Test

[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think this is worthy of being in whatsnew. Feel free to update the other docs though. -- ___ Python tracker <http://bugs.python.org/is

[issue11071] What's New review comments

2011-03-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue11071> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11666] Teach pydoc to display full help for named tuples

2011-03-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed title: Test pydoc to display full help for named tuples -> Teach pydoc to display full help for named tuples ___ Python tracker <http://bugs.python.or

[issue11674] list(obj), tuple(obj) swallow TypeError (in _PyObject_LengthHint)

2011-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: A certain amount of exception masking is inherent is Python's design. We use TypeError for a lot of things, including the exception raised by "len(obj)" when obj doesn't have length. It may be possible to replace the TypeError check

[issue11674] list(obj), tuple(obj) swallow TypeError (in _PyObject_LengthHint)

2011-03-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issu

[issue11674] list(obj), tuple(obj) swallow TypeError (in _PyObject_LengthHint)

2011-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Which also makes me think that Python's exceptions are, > maybe, too coarse sometimes. I agree :-) -- assignee: -> rhettinger ___ Python tracker <http://bugs.pyth

[issue11698] Improve repr for structseq objects to show named, but unindexed fields

2011-03-27 Thread Raymond Hettinger
New submission from Raymond Hettinger : The current __repr__ for structseq only shows the name/value pairs for the positional part and it ignores the other named fields. For example, os.stat(somefile) returns: posix.stat_result(st_mode=33277, st_ino=8468407, st_dev=234881026, st_nlink=1

[issue11707] Create C version of functools.cmp_to_key()

2011-03-28 Thread Raymond Hettinger
New submission from Raymond Hettinger : For cases where the underlying comparison function is in C (strcoll for example), the pure Python dispatch in cmp_to_key dominates running time. This can be reduced considerably by writing cmp_to_key in C, making its overhead as low or lower than the

[issue11549] Rewrite peephole to work on AST

2011-03-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Eugene, I think you're doing great work here and would like to see you succeed. In the near term, I don't have time to participate, but don't let that stop you. -- ___ Python tracker <http

[issue11712] Doc list.sort(cmp=,key=) result.

2011-03-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger priority: normal -> low ___ Python tracker <http://bugs.python.org/i

[issue11713] collections.deque docstring wrong/misleading

2011-03-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger priority: normal -> low ___ Python tracker <http://bugs.python.org/issue11713> ___ ___ Pyth

[issue11712] Doc list.sort(cmp=,key=) result.

2011-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: There's no need to guess what it does ;-) We don't document by experiment when source and test suites are available. Mathew was correct, it works as documented: the key function is applied at the outset (as it always does) and then cmp f

[issue11718] Teach IDLE's open-modue command to find packages

2011-03-29 Thread Raymond Hettinger
New submission from Raymond Hettinger : The open-module command is a fast effective way to examine source code regardless of where it sits on sys.path; however, it gets lost when seeking a package name. Instead of aborting, it could bring-up the __init__.py file. For example, "open-m

[issue11713] collections.deque docstring wrong/misleading

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

[issue11712] Doc list.sort(cmp=,key=) result.

2011-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you. -- ___ Python tracker <http://bugs.python.org/issue11712> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11726] linecache becomes specific to Python scripts in Python 3

2011-03-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> high ___ Python tracker <http://bugs.python.org/issue11726> ___ ___ Python-bugs-list mailing list Un

[issue11729] libffi assembler relocation check is not robust, fails with clang

2011-03-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue11729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11733] Implement a `Counter.elements_count` method

2011-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the feature request. Py3.3 is a long ways away, so I'll leave this open for a while. Comments in favor: * Precedent with Smalltalk bags that know their total length Comments against: * sum(c.values()) is trivial to write * fattening th

[issue11733] Implement a `Counter.elements_count` method

2011-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: > It would be interesting to have Counter.elements_count() > if it has a complexity of O(1): if the collections > maintains a total (in a private attribute). I agree that it would be interesting; however, it would be an implementation disaster.

[issue11674] list(obj), tuple(obj) swallow TypeError (in _PyObject_LengthHint)

2011-04-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Am going to close this one because I don't see any straight-forward way around it and because it's technically not a bug (just an undesirable design artifact). The use of TypeError for objects that don't define __len__ is deeply ingrained

[issue11661] test_collections.TestNamedTuple.test_source failing on many buildbots after f09f7ab40ce6

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

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nice work. There are a few nits (dealloc and traverse need to address both python objects in the struct). I will look at the patch in detail when I get a chance (in the next week or so). It would be great if more tests were added (in general, C

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Filip, can you please submit a contributor agreement? http://docs.python.org/devguide/coredev.html#sign-a-contributor-agreement -- ___ Python tracker <http://bugs.python.org/issue11

[issue9424] Deprecate assertEquals, assertNotEquals, assert_, assertAlmostEquals, assertNotAlmostEquals

2011-04-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: It probably would have been okay to remove assertDictContainsSubset which had nearly zero uptake (according to Google's code search). That's probably because it addresses an uncommon use case, because it was only recently introduced, and b

[issue11707] Create C version of functools.cmp_to_key()

2011-04-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the PSF is working towards getting electronic signatures for contributor agreements. In the mean time, a scan or photo would work just fine. -- ___ Python tracker <http://bugs.python.org/issue11

[issue9951] introduce bytes.hex method

2011-04-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: See also: issue11756 -- nosy: +rhettinger versions: +Python 3.3 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue9

[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I was only aiming for Py3.3. If someone wanted to push for a backport to 3.2, it would be up to the release manager to decide whether a performance booster would be worth the risk of introducing a bug in a point release. ISTM that if someone really

[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm working on cleaning-up (and speeding-up) the patch. I'll post new timings once that's done. -- ___ Python tracker <http://bugs.pyt

<    3   4   5   6   7   8   9   10   11   12   >