Re: bool type have big problem. finally program returned "True".Is this the TRUE spec?

2025-01-20 Thread Alan Bawden via Python-list
あうぇくろ writes: tpr=composite(type,print) print(tpr('a')==tpr(1)) Why does tpr('a')==tpr(1) return True? Because tpr always returns the value None. -- https://mail.python.org/mailman/listinfo/python-list

bool type have big problem. finally program returned "True".Is this the TRUE spec?

2025-01-20 Thread あうぇくろ via Python-list
from typing import List from types import FunctionType, LambdaType def composite(*func: List[FunctionType]) -> LambdaType: if len(func) < 2: raise TypeError(f'composite expected over 2 arguments, but got {len(func)}') if len(func) == 2: return lambda *args, **kwargs: func[1](func[0](*args, **kwar

Re: Strategies for avoiding having to use --break-system-packages with pip

2025-01-20 Thread Chris Green via Python-list
Peter J. Holzer wrote: > [-- text/plain, encoding quoted-printable, charset: us-ascii, 32 lines --] > > On 2025-01-14 11:32:35 +, Chris Green via Python-list wrote: > > Use a virtual environment, what do I have to do then to make using > > my program (that uses tkintertable) 'transpar

Re: Tools to help with text mode (i.e. non-GUI) input

2025-01-20 Thread Lele Gaifax via Python-list
Chris Green via Python-list writes: > I'm looking for Python packages that can help with text mode input, > i.e. for use with non-GUI programs that one runs from the command > prompt in a terminal window running a bash shell or some such. I'd suggest giving a try to https://pypi.org/project/ques