[Python-ideas] typing.modifiers

אלעזר elazarg at gmail.com
Fri Sep 16 07:21:04 EDT 2016


>
> > 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

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160916/2d5a8b05/attachment.html>


More information about the Python-ideas mailing list