Obviously they didn’t do that. There are trade-offs when preserving dictionary ordering.
Obviously they didn’t do that. There are trade-offs when preserving dictionary ordering.
Reproducibility matters for tests, they become simpler. Some other algorithms become simpler as well.
LRU is just a dict with preserving order: on access just delete and insert again.
> high-performance Python implementation
then no this aren't trade-offs but breaking the standard without it truly being necessary
most important this will break code in a subtle and potentially very surprising way
they could just claim they are python like and then no one would hold them for not keeping to the standard
but if you are misleading about your product people will find offense even if it isn't intentionally
They may be in the current implementations, but removing an implementation constraint can only increase the solution space, so it cannot make the best implementation slower.
As a trivial example, the current implementation that guarantees iteration happens in insertion order also is a valid implementation for a spec that does not require that guarantee.