Comment by gizmo686
2 days ago
The problem is that once this side effect is in the main version for a while, it becomes a feature whether you admit it or not. Since that is going to happen anyway, you might as well make it official.
The alternative approach is to do what Go did and explicitly randomize iteration order to prevent people from relying on a fixed order in the first place.
> explicitly randomize iteration
In fact, we see this with CPython `set`, controlled by `_Py_HashSecret`:
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...