Fix 'point.py'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-11 12:57:52 +01:00
parent d85aa7a76d
commit ba3fdd6204

View File

@@ -21,10 +21,10 @@ class Point():
def get_y(self): def get_y(self):
"""Returns the Y-Coordinate of the Point""" """Returns the Y-Coordinate of the Point"""
return self.__y return self.__y
def __eq__(self, other) def __eq__(self, other):
"""Returns True if the points coordinates are the same, else returns False""" """Returns True if the points coordinates are the same, else returns False"""
return self.get_x() == other.get_x() and self.get_y() == other.get_y() return self.get_x() == other.get_x() and self.get_y() == other.get_y()
def __ne__(self, other) def __ne__(self, other):
"""Returns True if the points coordinates are the different, else returns False""" """Returns True if the points coordinates are the different, else returns False"""
return self.get_x() != other.get_x() or self.get_y() != other.get_y() return self.get_x() != other.get_x() or self.get_y() != other.get_y()
def __str__(self): def __str__(self):