Re: [Python-ideas] INSANE FLOAT PERFORMANCE!!!

2016-10-11 Thread Nick Coghlan
On 12 October 2016 at 06:58, Elliot Gorokhovsky wrote: > So I got excited here. And the reason why is that I got those numbers *on > Tim's benchmark*. When I got these kinds of numbers on my benchmarks, I > figured there was probably a problem with they way I was

Re: [Python-ideas] INSANE FLOAT PERFORMANCE!!!

2016-10-11 Thread Terry Reedy
On 10/11/2016 2:30 PM, Paul Moore wrote: On 11 October 2016 at 17:49, Nick Coghlan wrote: On 12 October 2016 at 02:16, Elliot Gorokhovsky wrote: So I thought, wow, this will give some nice numbers! But I underestimated the power of this

Re: [Python-ideas] INSANE FLOAT PERFORMANCE!!!

2016-10-11 Thread Elliot Gorokhovsky
So I got excited here. And the reason why is that I got those numbers *on Tim's benchmark*. When I got these kinds of numbers on my benchmarks, I figured there was probably a problem with they way I was timing, and certainly the gains couldn't be as extreme as they suggested. But this is on a

Re: [Python-ideas] INSANE FLOAT PERFORMANCE!!!

2016-10-11 Thread Paul Moore
On 11 October 2016 at 17:49, Nick Coghlan wrote: > On 12 October 2016 at 02:16, Elliot Gorokhovsky > wrote: >> So I thought, wow, this will give some nice numbers! But I underestimated >> the power of this optimization. You have no idea. It's

Re: [Python-ideas] INSANE FLOAT PERFORMANCE!!!

2016-10-11 Thread Nick Coghlan
On 12 October 2016 at 02:16, Elliot Gorokhovsky wrote: > So I thought, wow, this will give some nice numbers! But I underestimated > the power of this optimization. You have no idea. It's crazy. > This is just insane. This is crazy. Not to take away from the

[Python-ideas] INSANE FLOAT PERFORMANCE!!!

2016-10-11 Thread Elliot Gorokhovsky
Warning: the contents of this message may be dangerous for readers with heart conditions. So today I looked at PyFloat_RichCompare. I had been scared initially because it was so complicated, I was worried I would miss some important error check or something if I special cased it. So I took the

Re: [Python-ideas] PEP8 dictionary indenting addition

2016-10-11 Thread Ryan Gonzalez
On Oct 11, 2016 10:40 AM, "Erik Bray" wrote: > > On Sun, Oct 9, 2016 at 2:25 AM, Steven D'Aprano wrote: > > On Sat, Oct 08, 2016 at 09:26:13PM +0200, Jelte Fennema wrote: > >> I have an idea to improve indenting guidelines for dictionaries for better >

Re: [Python-ideas] Adding full() to collections.deque

2016-10-11 Thread Guido van Rossum
Isn't the problem that you don't know if it's still full on the next line? After all you supposedly have a multi-threaded app here, otherwise why bother with any of that? Or maybe you can describe the real-world use case where you wanted this in more detail? Without much more evidence I can't

Re: [Python-ideas] warn/error when using a method as boolean in ifs/whiles

2016-10-11 Thread Ethan Furman
On 10/11/2016 07:00 AM, Steven D'Aprano wrote: On Tue, Oct 11, 2016 at 02:41:34PM +0200, Sven R. Kunze wrote: on django-developers, an intriguing idea appeared: https://groups.google.com/d/msg/django-developers/4bntzg1HwwY/HHHjbDnLBQAJ """ It seems to me that the default `method.__bool__` is

[Python-ideas] Adding full() to collections.deque

2016-10-11 Thread Tarek Ziadé
Hey, When creating deque instances using a value for maxlen, it would be nice to have a .full() method like what Queue provides, so one may do: my_deque = deque(maxlen=300) if my_deque.full(): do_something() instead of doing: if len(my_deque) == my_deque.maxlen: do_something() If

Re: [Python-ideas] [Python-Dev] Optimizing list.sort() by checking type in advance

2016-10-11 Thread Sven R. Kunze
On 11.10.2016 05:02, Tim Peters wrote: Let's not get hung up on meta-discussion here - I always thought "massive clusterf**k" was a precise technical term anyway ;-) I thought so as well. ;) http://www.urbandictionary.com/define.php?term=clusterfuck Cheers, Sven