Re: [Python-Dev] Add __reversed__ methods for dict

2018-05-26 Thread Raymond Hettinger
> On May 26, 2018, at 7:20 AM, INADA Naoki wrote: > > Because doubly linked list is very memory inefficient, every implementation > would be forced to implement dict like PyPy (and CPython) for efficiency. > But I don't know much about current MicroPython and other Python > implementation's > pl

Re: [Python-Dev] lz4 compression

2018-05-26 Thread Antoine Pitrou
On Sat, 26 May 2018 18:42:42 +0200 Olivier Grisel wrote: > > However adding lz4.LZ4File to the standard library in addition to > gzip.GzipFile and lzma.LZMAFile is probably a good idea as LZ4 is really > fast compared to zlib/gzip. But this is not related to PEP 574. If we go that way, we may pr

Re: [Python-Dev] Add __reversed__ methods for dict

2018-05-26 Thread Guido van Rossum
Hm, I find Inada's argument compelling that this might not be easy for all implementations. So let's wait. On Sat, May 26, 2018 at 7:20 AM, INADA Naoki wrote: > > Concerns have been raised in the comments that this feature may add too > much > > bloat in the core interpreter and be harmful for o

Re: [Python-Dev] PEP 574 (pickle 5) implementation and backport available

2018-05-26 Thread Olivier Grisel
+1 for not adding in-pickle compression as it is already very easy to handle compression externally (for instance by passing a compressing file object as an argument to the pickler). Furthermore, as PEP 574 makes it possible to stream the buffer bytes directly to the file-object without any tempora

Re: [Python-Dev] PEP 574 (pickle 5) implementation and backport available

2018-05-26 Thread Matthew Rocklin
Hi all, I agree that compression is often a good idea when moving serialized objects around on a network, but for what it's worth I as a library author would always set compress=False and then handle it myself as a separate step. There are a few reasons for this: 1. Bandwidth is often pretty

Re: [Python-Dev] Add __reversed__ methods for dict

2018-05-26 Thread INADA Naoki
> Concerns have been raised in the comments that this feature may add too much > bloat in the core interpreter and be harmful for other Python implementations. To clarify, my point is it prohibit hashmap + single linked list implementation in other Python implementation. Because doubly linked lis

Re: [Python-Dev] PEP 574 (pickle 5) implementation and backport available

2018-05-26 Thread Stefan Behnel
Antoine Pitrou schrieb am 25.05.2018 um 23:11: > On Fri, 25 May 2018 14:50:57 -0600 > Neil Schemenauer wrote: >> On 2018-05-25, Antoine Pitrou wrote: >>> Do you have something specific in mind? >> >> I think compressed by default is a good idea. My quick proposal: >> >> - Use fast compression li