>
> > 1. This information can be used by typecheckers, and also by users, to
>> > reason about programs. If isinstance(x, ImmutableArray), then x is an
>> > instantiation of ImmutableArray.
>>
>> That's how type-checkers work. The class doesn't need to be in the std
>> lib for a type-checker to reason about it.
>>
> No, it's not how they work, since it's not true. I meant the actual type,
> not a subtype.
>
I now see my error - I meant  isinstance(x, SealedArray)... sorry.
Similarly the reasoning about ImmutableStruct with constant propagation.

~Elazar

>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to