blist.blist subclasses can't have custom operators
tzot opened this issue · 1 comments
tzot commented
I assume this is categorized as list compatibility
.
class CustomList(list):
def __div__(self, count):
return 5
>>> l= CustomList()
>>> l/1
5
class CustomBlist(blist.blist):
def __div__(self, count):
return 4
>>> l= CustomBlist()
>>> l/1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'CustomBlist' and 'int'
tzot commented
Sorry for the bad code formatting, I probably misinterpreted the instructions in GitHub Flavored Markdown.