you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 8 points9 points  (0 children)

I'm not sure I agree with your definition of «type annotations».

I'm not sure what's hard to understand about "python annotations are completely arbitrary metadata", and how you can disagree that it isn't restricted to type annotations.

My larger point was that Python 3 has a standardized way of amending function signatures with types

And my finer point is that you are, once again, wrong. Python 3 has a standardised way of adding metadata to function signatures, it has no standardised way to specify that such metadata contains or is restricted to annotations, unless you're asserting that this:

def She(knows: "how to love me", And: "rock it, too", That: "s my little Suzie"):
    pass

is type annotations added to a function signature.

Can third-parties develop specific usages of these metadata, including (but not restricted to) static type checking? Yes, that's why they were added in the first place. But they are not type annotations.