That sounds right to me. We will then have had two versions where this was
the case:
- 3.6 where order preserving was implemented in CPython but in the language
spec
- 3.7 where it was also added to the language spec
On Fri, Jun 8, 2018 at 11:05 AM, Michael Selik wrote:
> Am I correct in saying
Am I correct in saying that the consensus is +1 for inclusion in v3.8?
The last point in the thread was INADA Naoki researching various
implementations and deciding that it's OK to include this feature in 3.8.
As I understand it, Guido was in agreement with INADA's advice to wait for
Hi Inada,
On 27 May 2018 at 09:12, INADA Naoki wrote:
> When focusing to CPython, PyPy and MicroPython, no problem for adding
> __reverse__ in 3.8 seems OK.
Fwiw, the functionality that is present in OrderedDict but still
absent from 'dict' is: ``__reverse__``, discussed above, and
On Sun, May 27, 2018 at 12:43 PM Raymond Hettinger <
raymond.hettin...@gmail.com> wrote:
> > 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
> 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
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
> 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
I am also in agreement.
On Fri, May 25, 2018, 13:49 Guido van Rossum wrote:
> OK, +1
>
> On Fri, May 25, 2018 at 10:26 AM, Raymond Hettinger <
> raymond.hettin...@gmail.com> wrote:
>
>>
>>
>> > On May 25, 2018, at 9:32 AM, Antoine Pitrou
>> wrote:
>> >
>>
OK, +1
On Fri, May 25, 2018 at 10:26 AM, Raymond Hettinger <
raymond.hettin...@gmail.com> wrote:
>
>
> > On May 25, 2018, at 9:32 AM, Antoine Pitrou wrote:
> >
> > It's worth nothing that OrderedDict already supports reversed().
> > The argument could go both ways:
> >
> >
> On May 25, 2018, at 9:32 AM, Antoine Pitrou wrote:
>
> It's worth nothing that OrderedDict already supports reversed().
> The argument could go both ways:
>
> 1. dict is similar to OrderedDict nowadays, so it should support
> reversed() too;
>
> 2. you can use
It's worth nothing that OrderedDict already supports reversed().
The argument could go both ways:
1. dict is similar to OrderedDict nowadays, so it should support
reversed() too;
2. you can use OrderedDict to signal explicitly that you care about
ordering; no need to add anything to dict.
INADA Naoki asked Rémi Lapeyre in https://bugs.python.org/issue33462
to start a discussion on python-dev.
Victor
2018-05-25 17:48 GMT+02:00 Guido van Rossum :
> (Also this probably belongs in python-ideas, unless there's already a
> bugs.python.org issue for it -- but you
It looks like an optimization, since you can already do something like
reversed(list(d)). Do you have benchmark numbers to see the benefit of
your change?
Even if reversed(list(d)) is slow, I'm not sure that it's worth it to
optimize it, since it's a rare usecase.
Victor
2018-05-24 14:55
(Also this probably belongs in python-ideas, unless there's already a
bugs.python.org issue for it -- but you didn't mention that so I assume
it's just an idea? How did you reach the line count estimates?)
On Fri, May 25, 2018 at 8:46 AM, Guido van Rossum wrote:
> Please go
Please go find some real world code that would benefit from this. Don't
make up examples, just show some code in a repository (public if possible,
but private is okay, as long as you can quote small amounts of code from
it) where te existence of reverse iteration over a dict would have been
Hi,
since dict keys are sorted by their insertion order since Python 3.6 and that
it’s part of Python specs since 3.7 a proposal has been made in bpo-33462 to
add the __reversed__ method to dict and dict views.
Concerns have been raised in the comments that this feature may add too much
16 matches
Mail list logo