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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to