[Python-Dev] Is static typing still optional? (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sat Dec 23 20:54:29 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 23 Dec. 2017 9:37 am, "David Mertz" <mertz at gnosis.cx> wrote:
There name Data seems very intuitive to me without suggesting type declaration as Any does (but it can still be treated as a synonym by actual type checkers)
Type checkers would also be free to interpret it as "infer the type from the default value", rather than necessarily treating it as Any.
I still wonder about the "fields must be annotated" constraint though. I can understand a constraint that the style be consistent (i.e. all fields as annotations, or all fields as field instances), since that's needed to determine the field order, but I don't see the problem with the "no annotations" style otherwise.
Cheers, Nick. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171224/6e8a5eca/attachment.html>
- 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 ]