New submission from jason kirtland <jek@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@bugs.python.org>
<http://bugs.python.org/issue3935>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
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@bugs.python.org>
<http://bugs.python.org/issue3935>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com