Skip to content

Insert() is not functional when data with properties inserted #5

@LeiMazizizi

Description

@LeiMazizizi
def insert(self, point):
    """
    Inserts a `Point` into the quadtree.

    Args:
        point (Point|tuple|None): The point to insert.
        data (any): Optional. Corresponding data for that point. Default
            is `None`.

    Returns:
        bool: `True` if insertion succeeded, otherwise `False`.
    """
    pnt = self.convert_to_point(point)
    # pnt.data = data
    return self._root.insert(pnt)

In the insert() of class QuadTree, suggest to remove the "data=None" in the insert and delete "pnt.data=data".

Sorry for the code format and hope this helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions