Add an advent of code template for python-base-mode

This commit is contained in:
Evie Litherland-Smith 2024-12-24 10:13:21 +00:00
parent 124681c875
commit 5ecb04b86f

View file

@ -10,6 +10,26 @@ nix-mode
"in" n "in" n
> "fhs.env") > "fhs.env")
python-base-mode
(aoc "EXAMPLE=\"\"\"" n
"\"\"\"" n n
"class " (p "MyClass" class) ":" n
> "def __init__(self, input: str) -> None:" n
> "self._input = input[1:]" n
> "return" n n
> "def __str__(self) -> str:" n
> "return f\"Part1: {self._part1}\\nPart2: {self._part2}\"" n n
> "@property" n
> "def _part1(self) -> int:" n
> "return None" n n
> "@property" n
> "def _part2(self) -> int:" n
> "return None" n n n
"if __name__ == \"__main__\":" n
> "example = " (s class) "(EXAMPLE)" n
> "print(example)")
;; Local Variables: ;; Local Variables:
;; mode: lisp-data ;; mode: lisp-data
;; outline-regexp: "[a-z]" ;; outline-regexp: "[a-z]"