Another alternative mentioned was `move`, which would create a frozen version in constant time and clear the original dict.
If all it does is set a flag that prevents modifications, that's different.
If all it does is set a flag that prevents modifications, that's different.