We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeac475 commit 8e11c30Copy full SHA for 8e11c30
data_structures/binary_tree/binary_search_tree.py
@@ -91,12 +91,11 @@
91
92
from __future__ import annotations
93
94
-
95
from collections.abc import Iterable, Iterator
96
from dataclasses import dataclass
97
-from pprint import pformat
98
from typing import Any, Self
99
+
100
@dataclass
101
class Node:
102
value: int
@@ -116,6 +115,7 @@ def __iter__(self) -> Iterator[int]:
116
115
yield from self.right or []
117
118
def __repr__(self) -> str:
+ from pprint import pformat
119
120
if self.left is None and self.right is None:
121
return str(self.value)
0 commit comments