On Sat, 2 Apr 2022 at 02:30, Christopher Barker <python...@gmail.com> wrote: > > On Fri, Apr 1, 2022 at 4:06 AM Steve Dower <steve.do...@python.org> wrote: >> >> The main difference is that 'immutables' offers you a stable/versioned >> interface to use it, while the one that's in CPython is an internal >> implementation detail. If one day we find a better design, we can just >> switch to it, while 'immutables' probably can't. If we've exposed as a >> public interface in the core runtime, it's much more complicated. > > > I don't understand the issue here: > > If we expose a "frozendict" as built in python object then only the API of > that object needs to remain stable, not the implementation. > > And it seems that's an API that is already clearly defined. > > + 1 from me -- just the other day I was wishing it was there.
There would presumably need to be be a C API as well, and that would probably expose more of the implementation unless handled carefully. Without seeing an actual implementation, it's hard to know for sure. Paul _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/Y5RV73EOBXMQ252KWIZQYLUNCE3DW3OJ/ Code of Conduct: http://python.org/psf/codeofconduct/