[Python-ideas] Re: Revise using the colon ( : )

2023-09-20 Thread Celelibi
> while a < b(x := c) - 42: >># ??? I actually think this is the better parsing of the three: a SyntaxError. Celelibi ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@pytho

[Python-ideas] Re: Revise using the colon ( : )

2023-09-11 Thread Celelibi
e. The keyword at the begining of the line doesn't matter. Best regards, Celelibi ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.pytho

[Python-ideas] Re: while(tt--)

2023-08-19 Thread Celelibi
us operator was precisely that it makes the order of evaluation much more important to know in order to understand a program. Assuming a = 0, what does this do: print(a, (a := a + 1), a) ? At least python makes it defined and obvious *when* the side effect occurs... As long as you know that expressions are

[Python-ideas] Re: else without except

2023-08-07 Thread Celelibi
a bare 'except'. I think this could be made simpler by allowing 'else' without any 'except'. Celelibi ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailm

[Python-ideas] Re: else without except

2023-08-07 Thread Celelibi
2023-08-01 18:14 UTC+02:00, Chris Angelico : > On Wed, 2 Aug 2023 at 02:02, Celelibi wrote: >> If later on an "except" is added, the developper doing the >> modification should be reminded to move the call to >> no_error_occurred() into an "else". With

[Python-ideas] Re: else without except

2023-08-01 Thread Celelibi
ual execution is the same. In the first case you intend to only catch the exceptions generated by do_stuff(). In the second case, you intend to catch those generated by do_stuff() and those generated by no_error_occurred(). If later on an "except" is added, the developper doing the modificat

[Python-ideas] Re: [Python-Dev] Making asyncio more thread-friendly

2020-06-08 Thread Celelibi
On Sun, Jun 07, 2020 at 03:47:05PM +0900, Stephen J. Turnbull wrote: > Hi, Celelibi, > > Welcome to Python Ideas. > > Python Dev is more for discussions of implementations of proposed > features, typically clearly on their way to an accepted pull request > into master. Pyt

[Python-ideas] asyncio: recursive event loops

2020-06-04 Thread Celelibi
Hello world, I've been recently trying to switch from a library using gevent to a library using asyncio. And do so without contaminating the whole code with the "async" keyword in one go. As expected, calling the synchronous code from a coroutine is pretty straightforward. But the other way

[Python-ideas] hybrid regex engine: backtracking + Thompson NFA

2018-11-25 Thread Celelibi
cktracking of some parts of the regex interact with the multi-state evaluation of the other parts. But at least it exists and works, so it is feasible. Best regards, Celelibi [1] https://mail.python.org/pipermail/python-dev/2010-March/098354.html [2] https://swtch.com/~rsc/regexp/regexp1.html

[Python-ideas] Make threading.Event support test-and-set

2016-11-26 Thread Celelibi
g = False +return prevflag def wait(self, timeout=None): """Block until the internal flag is true. What do you think about it? Best regards, Celelibi ___ Python-ideas mailing list Python-ideas@python.org https://m