Skip to content

Instantly share code, notes, and snippets.

@obedespinoza
Created November 13, 2019 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obedespinoza/9ae5cbf7c316b83539209c3dfd566bd4 to your computer and use it in GitHub Desktop.
Save obedespinoza/9ae5cbf7c316b83539209c3dfd566bd4 to your computer and use it in GitHub Desktop.
from dataclasses import dataclass
@dataclass
class Coordinates:
x: int
y: int
def __str__(self):
return f"({self.x},{self.y})"
def __rpr__(self):
return f"Coordinates: ({self.x}, {self.y})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment