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.

22 lines
398 B
Python

from dataclasses import dataclass
from typing import Self
@dataclass
class Foo:
a: int
b: int
def print(self: Self) -> None:
print(self.a, self.b)
def max(self: Self) -> int:
return max(self.a, self.b)
def sum(self: Self) -> int:
return self.a + self.b
def change_vals(self: Self, a: int, b: int) -> None:
self.a = a
self.b = b