[Python-ideas] Re: Magnitude and ProtoMagnitude ABCs — primarily for argument validation

2020-03-09 Thread Richard Damon
On 3/9/20 12:41 AM, Steven D'Aprano wrote: > Wait, no, that's not right either... each element doesn't compare less > than the previous element? > If the elements of the list don't form a total order, then sort makes NO promises about the data returned, other than it is the input data in some orde

[Python-ideas] Re: Magnitude and ProtoMagnitude ABCs — primarily for argument validation

2020-03-09 Thread Steven D'Aprano
On Mon, Mar 09, 2020 at 06:39:10AM -0400, Richard Damon wrote: > On 3/9/20 12:41 AM, Steven D'Aprano wrote: > > Wait, no, that's not right either... each element doesn't compare less > > than the previous element? > > > If the elements of the list don't form a total order, then sort makes NO > pro

[Python-ideas] Re: Magnitude and ProtoMagnitude ABCs — primarily for argument validation

2020-03-09 Thread Richard Damon
On 3/9/20 7:45 AM, Steven D'Aprano wrote: > On Mon, Mar 09, 2020 at 06:39:10AM -0400, Richard Damon wrote: >> On 3/9/20 12:41 AM, Steven D'Aprano wrote: >>> Wait, no, that's not right either... each element doesn't compare less >>> than the previous element? >>> >> If the elements of the list don'

[Python-ideas] Re: Fwd: Possible Addition to Python Language: Marked Sub-condition

2020-03-09 Thread Shrinivas Kulkarni
Hi Rajeev and others Thanks for your responses. I completely overlooked the simple fact that the conditions are evaluated to boolean values and as such can be stored in variables. In the hindsight there may perhaps be a couple of (far-fetched) merits to my proposal (like useful in conditions with

[Python-ideas] Re: Possible Addition to Python Language: Marked Sub-condition

2020-03-09 Thread David Mertz
This isn't a terrible use of the walrus operator either. if blue_20 := (color==BLUE and count==20) or red_5 := (color==RED and count%5==0) rotate_the_wheel() # Common to the two sub-conditions if blue_20: # First sub-condition set_signal() if red_5: # Second sub-condition

[Python-ideas] Re: Mailman 3 monthly summaries broken for Python-ideas

2020-03-09 Thread Christopher Barker
On Sun, Mar 8, 2020 at 7:41 AM André Roberge wrote: > I am currently attempting to go through the entire archives of > Python-ideas to make a summary of the discussions about adding a syntax for > decimal literals in Python. > Mailman issues, aside, thanks for doing this! I'd really love to see

[Python-ideas] Re: Possible Addition to Python Language: Marked Sub-condition

2020-03-09 Thread MRAB
On 2020-03-09 14:16, David Mertz wrote: This isn't a terrible use of the walrus operator either. if blue_20 := (color==BLUE and count==20) or red_5 := (color==RED and count%5==0)     rotate_the_wheel() # Common to the two sub-conditions     if blue_20: # First sub-condition

[Python-ideas] Non-blocking concurrent.futures ThreadPoolExecutor

2020-03-09 Thread Remy NOEL
I ran into a problem which, according to a google search is not that uncommon: concurrent.futures ThreadPoolExecutor, installs an exit handler preventing program exit if any of the jobs it is running is blocked. (Which might be a surprising behaviour to someone using those). It is possible to

[Python-ideas] Re: Magnitude and ProtoMagnitude ABCs — primarily for argument validation

2020-03-09 Thread Tim Peters
[Steven D'Aprano ] > ... > All I intended was to say that sort would "work" in the sense you state: > it will give *some* permutation of the data, where (I think, correct me > if I'm wrong) each element compares less than the following element. > > Wait, no, that's not right either... each element

[Python-ideas] Re: Non-blocking concurrent.futures ThreadPoolExecutor

2020-03-09 Thread Kyle Stanley
> It would seems reasonable to have a separate _daemon_thread_queues dict (in contrast to _threads_queues) that would not get joined upon exit. > A "daemon" (or any better name) parameter of ThreadPoolExecutor initialisation would allow to let it add its workers in this dict rather than the default

[Python-ideas] Re: Mailman 3 monthly summaries broken for Python-ideas

2020-03-09 Thread Brett Cannon
Guido is correct as we don't directly control the software. It's probably a bug with Mailman 3/Hyperkitty. On Sun, Mar 8, 2020 at 2:35 PM Guido van Rossum wrote: > I think this is more of an issue to bring up with [email protected]. > > On Sun, Mar 8, 2020 at 7:41 AM André Roberge > wrote:

[Python-ideas] Re: Magnitude and ProtoMagnitude ABCs — primarily for argument validation

2020-03-09 Thread Steven D'Aprano
On Mon, Mar 09, 2020 at 04:50:49PM -0500, Tim Peters wrote: > [Steven D'Aprano ] > > ... > > All I intended was to say that sort would "work" in the sense you state: > > it will give *some* permutation of the data, where (I think, correct me > > if I'm wrong) each element compares less than the fol

[Python-ideas] Re: Magnitude and ProtoMagnitude ABCs — primarily for argument validation

2020-03-09 Thread Tim Peters
[Tim] >> If the result of Python's sort is >> >> [x, y] >> >> then I happen to know (because I know everything about its >> implementation) that one of two things is true: >> >> - The original list was also [x, y], and y < x was False. [Steven] > That's my reasoning, based on your earlie

[Python-ideas] Re: Fwd: Possible Addition to Python Language: Marked Sub-condition

2020-03-09 Thread Kyle Stanley
> So I am sorry for the spam. Will be careful the next time. I wouldn't worry about it too much. :) In future, if you can establish to some degree that: 1) The feature isn't already available (if you're unsure, try python-list as suggested above) 2) It has some realistic use cases 3) It hasn't b