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

jason kirtland report at bugs.python.org
Mon Sep 22 20:54:44 CEST 2008


New submission from jason kirtland <jek at discorporate.us>:

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(), 123)

object-derived classes are OK.

----------
components: Library (Lib)
files: test.py
messages: 73589
nosy: jek
severity: normal
status: open
title: bisect insort C implementation ignores methods on list subclasses
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file11561/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3935>
_______________________________________


More information about the Python-bugs-list mailing list