On Sat, 22 Jan 2022 at 09:45, Steven D'Aprano <st...@pearwood.info> wrote: > > On Fri, Jan 21, 2022 at 10:56:42PM +1100, Chris Angelico wrote: > > > Let's be fair here... The idea of freezing is to make it hashable, > > And immutable. > > > so there's no point talking about freezing a function, module, > > Neither of which are immutable. >
Okay, so what would freezing a function be useful for, then? What is your use-case here? Mutable objects can't be used as dict keys, so there is a strong use-case for versions of them which can. But when arbitrary attributes don't contribute to equality, freezing becomes largely irrelevant. I can subclass frozenset and allow attributes. Do we then need a "really frozen set"? What is the point of such a protocol, given that my subclass is still hashable? Or are you just arguing for the sake of arguing? ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/UTN7G5XQ5QTJKH4TFCM7WXIQE4JIIW3D/ Code of Conduct: http://python.org/psf/codeofconduct/