On 22Oct2023 17:50, Antoon Pardon wrote:
I have the following small module:
=-=-=-=-=-=-=-=-=-=-=-= 8< =-=-=-=-=-=-=-=-=-=-=-=-=
class Pnt (NamedTuple):
x: float
y: float
def __add__(self, other: PNT) -> Pnt:
return Pnt(self[0] + other[0], self[1] + other[1])
When this
On 23/10/2023 04.50, Antoon Pardon via Python-list wrote:
I have the following small module:
=-=-=-=-=-=-=-=-=-=-=-= 8< =-=-=-=-=-=-=-=-=-=-=-=-=
from typing import NamedTuple, TypeAlias, Union
from collections.abc import Sequence
PNT: TypeAlias = tuple[float, float]
class Pnt (NamedTuple):
I have the following small module:
=-=-=-=-=-=-=-=-=-=-=-= 8< =-=-=-=-=-=-=-=-=-=-=-=-=
from typing import NamedTuple, TypeAlias, Union
from collections.abc import Sequence
PNT: TypeAlias = tuple[float, float]
class Pnt (NamedTuple):
x: float
y: float
def __add__(self, other: