Op 23/09/2024 om 09:44 schreef Annada Behera via Python-list:
The "next-level math trick" Newton-Raphson has nothing to do with
functional programming. I have written solvers in purely iterative
style.
What is your point. Any problem solved in a functional style can
also be solved in a pure int
Op 28/03/2024 om 17:45 schreef ast via Python-list:
Hello
Suppose I have these 3 strings:
s1 = "AZERTY"
s2 = "QSDFGH"
s3 = "WXCVBN"
and I need an itertor who delivers
A Q W Z S C E D C ...
I didn't found anything in itertools to do the job.
The documentation mentions a roundrobin recipe
Op 14/01/2024 om 13:28 schreef Left Right via Python-list:
Python isn't a context-free language, so the grammar that is used to
describe it doesn't actually describe the language... so, it's a
"pretend grammar" that ignores indentation.
No it doesn't. Here is the definition of a block, it cl
Op 29/12/2023 om 16:02 schreef Karsten Hilbert via Python-list:
Am Fri, Dec 29, 2023 at 07:49:17AM -0700 schrieb Mats Wichmann via Python-list:
I am not sure why mypy thinks this
gmPG2.py:554: error: Argument "queries" to "run_rw_queries" has incompatible type
"List[Dict[str, str]]"; expecte
Op 23/12/2023 om 12:34 schreef Barry Scott:
On 23 Dec 2023, at 09:48, Antoon Pardon via Python-list
wrote:
Because I have functions with DirEntry parameters.
I would duck-type a class I control to be my DirEnrry in this situation.
Would also help you when debugging as you can tell
Op 22/12/2023 om 21:39 schreef DL Neil via Python-list:
Antoon,
On 12/23/23 01:00, Antoon Pardon via Python-list wrote:
I am writing a program that goes through file hierarchies and I am
mostly
using scandir for that which produces DirEntry instances.
At times it would be usefull if I could
I am writing a program that goes through file hierarchies and I am mostly
using scandir for that which produces DirEntry instances.
At times it would be usefull if I could make my own DirEntry for a specific
path, however when I try, I get the following diagnostic:
os.DirEntry('snap')
Tracebac
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)