[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-10-08 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: OK, committed as r66856, should get merged to 3.0 soon. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-10-05 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Don't think this is too late for Py3.0. -- assignee: rhettinger -> georg.brandl nosy: +georg.brandl resolution: -> accepted versions: +Python 2.7, Python 3.0 -Python 2.5, Python 2.6 ___ Python

[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-26 Thread Dmitry Vasiliev
Dmitry Vasiliev <[EMAIL PROTECTED]> added the comment: Good idea! Don't know why I didn't use it in the very first version. :-) New patch attached. Added file: http://bugs.python.org/file11623/bisect2.patch ___ Python tracker <[EMAIL PROTECTED]>

[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: We could keep the optimization for the standard case: What about simply replacing PyList_Check with PyList_CheckExact? - most usages use plain lists, and will even run slightly faster - list-derived objects get the desired behaviour. -

[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-26 Thread Dmitry Vasiliev
Dmitry Vasiliev <[EMAIL PROTECTED]> added the comment: Actually it was an optimization. PyList_Insert() was used for list and list-derived objects. I've attached the patch which fix the issue and for me the new code looks even cleaner than the original code. -- keywords: +patch nosy: +h

[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-23 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: -> rhettinger nosy: +rhettinger priority: -> low ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-22 Thread jason kirtland
New submission from jason kirtland <[EMAIL PROTECTED]>: The C implementation (only) of bisect does not invoke list subclass methods when insorting. Code like this will not trigger the assert: class Boom(list): def insert(self, index, item): assert False bisect.insort(Boom(),