[Python-Dev] Is static typing still optional? (original) (raw)
Paul Moore p.f.moore at gmail.com
Tue Dec 19 05:53:20 EST 2017
- Previous message (by thread): [Python-Dev] Is static typing still optional?
- Next message (by thread): [Python-Dev] Is static typing still optional?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 19 December 2017 at 07:49, Eric V. Smith <eric at trueblade.com> wrote:
Data Classes is also not the first use of type annotations in the stdlib: https://docs.python.org/3/library/typing.html#typing.NamedTuple
Also, the fact that no-one raised this issue during the whole time the PEP was being discussed (at least as far as I recollect) and that Guido (who of all of us should be most aware of what is and isn't acceptable use of annotations in the stdlib) approved the PEP, suggests to me that this isn't that big a deal.
The only thing that has surprised me in this discussion is that the actual type used in the annotation makes no difference. And once someone reminded me that types are never enforced at runtime (you can call f(x: int) with f('haha')) that seemed fine.
Paul
- Previous message (by thread): [Python-Dev] Is static typing still optional?
- Next message (by thread): [Python-Dev] Is static typing still optional?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]