ideasman42 / isect_segments-bentley_ottmann

BentleyOttmann sweep-line implementation (for finding all intersections in a set of line segments)
MIT License
91 stars 40 forks source link

_ABCTree still has vestiges of being a dict #8

Closed nedbat closed 3 years ago

nedbat commented 7 years ago

One of my tests had this failure (among others):

AttributeError("'RBTree' object has no attribute 'items'") raised in repr()

which is due to _ABCTree.__repr__:

    def __repr__(self):
        """T.__repr__(...) <==> repr(x)"""
        tpl = "%s({%s})" % (self.__class__.__name__, '%s')
        return tpl % ", ".join(("%r: %r" % item for item in self.items()))

Also, I notice in _ABCTree.__init__:

        if items is not None:
            self.update(items)

but there is no update method.