This repository has been archived on 2024-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
lessons/Python/OOP2/task6.py
2023-07-16 13:23:25 +00:00

13 lines
181 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from dataclasses import dataclass
from typing import Self
@dataclass
class Game:
name: str
year: int
# НАХ?
def get_name(self: Self):
return self.name