parent
5aec5156ad
commit
b961a2119f
2
point.py
2
point.py
|
@ -13,7 +13,7 @@ class Point:
|
||||||
raise TypeError("You can compare only Point with Point")
|
raise TypeError("You can compare only Point with Point")
|
||||||
|
|
||||||
def __hash__(self) -> None:
|
def __hash__(self) -> None:
|
||||||
return int(f"{self.x}000{self.y}")
|
return int(f"{abs(self.x)}000{abs(self.y)}")
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f"{self.x = } | {self.y = }"
|
return f"{self.x = } | {self.y = }"
|
||||||
|
|
Loading…
Reference in New Issue