Guido van Rossum <gu...@python.org> added the comment:

I don’t think we’re waiting for more crazy hacks.

On Thu, Apr 29, 2021 at 07:27 STINNER Victor <rep...@bugs.python.org> wrote:

>
> STINNER Victor <vstin...@python.org> added the comment:
>
> >
> https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403
>
> In the past, I used _random.Random for manual tests to compare static type
> and heap types, check which one is mutable.
>
> C type _random.Random is inherited by Python type random.Random which is
> mutable. Since _random.Random is not directly seen by developers, I don't
> think that it's worth it to make it immutable.
>
> For the other types, I would not say that they are "built-in types" or
> that it would be really bad to modify them. I would say that for the other
> types, the "We are consenting adults" rule stands. You can hack a type for
> a very specific need, but in this case you are on your own.
>
> For example, people love to hack AST. Maybe the fact that ast.AST became
> mutable in Python 3.9 will unlock some crazy hack?
>
> ----------
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <https://bugs.python.org/issue43908>
> _______________________________________
>
-- 
--Guido (mobile)

----------
title: array.array and re types must be immutable: add Py_TPFLAGS_IMMUTABLETYPE 
flag -> array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43908>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to