Skip to content

Instantly share code, notes, and snippets.

@MartinThoma
Created March 3, 2021 22:54
Show Gist options
  • Save MartinThoma/20666e9ef3b68ac5eec2751981c5f6c0 to your computer and use it in GitHub Desktop.
Save MartinThoma/20666e9ef3b68ac5eec2751981c5f6c0 to your computer and use it in GitHub Desktop.
from typing import Optional
from dataclasses import dataclass
@dataclass
class Position:
longitude: float
latitude: float
address: Optional[str] = None
pos1 = Position(49.0127913, 8.4231381, "Parkstraße 17")
pos2 = Position(42.1238762, 9.1649964, None)
def get_distance(p1: Position, p2: Position) -> float:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment