[Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered (original) (raw)
Franklin? Lee leewangzhong+python at gmail.com
Wed Sep 14 08:39:47 EDT 2016
- Previous message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Next message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sep 14, 2016 8:29 AM, "Paul Moore" <p.f.moore at gmail.com> wrote:
On 14 September 2016 at 13:18, Franklin? Lee <leewangzhong+python at gmail.com> wrote: > On Sep 9, 2016 1:35 AM, "Benjamin Peterson" <benjamin at python.org> wrote: >> On Thu, Sep 8, 2016, at 22:33, Tim Delaney wrote: >> > Are sets also ordered by default now? None of the PEPs appear to mention >> > it. >> >> No. > > Is there anyone working to move sets in the same direction for 3.6? It won't happen for 3.6, as we're now in feature freeze. So it'd be 3.7 at the earliest. What exactly do you mean by "in the same direction" anyway? Remember that ordering isn't guaranteed (it's an implementation detail), so are you just saying "can sets benefit from the improvements this change provided to dicts"? If you are hoping for ordered sets, what's your use case? (Dictionaries had particular use cases - retaining ordering of keyword arguments and class definitions, the existence of OrderedDict, ...) Paul
I mean using a compact representation, if not an ordered one.
I have no particular usecase in mind. As far as I understand the compact implementation, sets can do it just as well. The original discussion proposed trying to implement it for sets first.
Like dict, they would (probably) use less memory, and would usually have a more readable (i.e. less jarring to read) print order. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160914/0ce7a845/attachment.html>
- Previous message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Next message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]