Re: return type same as class gives NameError.

2023-10-22 Thread Cameron Simpson via Python-list
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 functio

Re: Simple webserver

2023-10-22 Thread Dieter Maurer via Python-list
Janis Papanagnou wrote at 2023-10-21 04:03 +0200: > ... >I'd like to ask; where do you see the specific risks with Python >(as language per se) and it's (web-socket-)libraries here? The web server in Python's runtime library is fairly simple, focusing only on the HTTP requirements. You might want

Re: return type same as class gives NameError.

2023-10-22 Thread dn via Python-list
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):

return type same as class gives NameError.

2023-10-22 Thread Antoon Pardon via Python-list
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: PNT)

Cheetah 3.3.3

2023-10-22 Thread Oleg Broytman via Python-list
Hello! I'm pleased to announce version 3.3.3, the fourth release of branch 3.3 of CheetahTemplate3. What's new in CheetahTemplate3 == Minor features: - Protect ``import cgi`` in preparation to Python 3.13. Tests: - Run tests with Python 3.12. CI: - GHActio