logoalt Hacker News

zahlmanyesterday at 1:27 PM1 replyview on HN

> You can already do something similar

Only if you deny access to the underlying real dict.


Replies

ali_myesterday at 1:53 PM

Yes, this only prevents the callee from mutating it, it can't provide a strong guarantee that the underlying mapping won't be changed upstream (and hence MappingProxyType can't be washable).