Chris Barker - NOAA Federal wrote: > If I have this right, on the discussion about frozen and hash, a use > case was brought up for taking a few steps to create an instance (and > thus wanting it not frozen) and then wanting it hashable. > > Which pointed to the idea of a “ freeze this from now on” method. The problem with a "freeze" method is that it doesn't play well with subclasses. The object ends up frozen by the base class's __new__ or __init__, preventing the subclass from doing its own initialisation unless it uses some form of back-door access. And if there is a back door, it might as well be used for all initialisation, maing the freeze method unnecessary. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4