[Python-ideas] Typecheckers: there can be only one

Paul Moore p.f.moore at gmail.com
Thu Sep 8 06:53:39 EDT 2016


On 8 September 2016 at 10:46, Hugh Fisher <hugo.fisher at gmail.com> wrote:
> Annotations look like code, they're mixed in with names and operators
> and literals and keywords, and all the standard syntax and semantic
> checks are applied.

Apologies - I was thinking you were referring to variable annotations
(and even there I was forgetting that the proposal had been changed to
allow runtime introspection).

What I should have said is that annotations do precisely that - they
*annotate* the code objects with information. They don't in themselves
have semantic consequences (and that's something the various PEPs have
been at pains to establish - code that doesn't explicitly introspect
the annotations will run the same with or without them).

Paul


More information about the Python-ideas mailing list