[Python-Dev] PEP 526 ready for review: Syntax for Variable and Attribute Annotations (original) (raw)
Yury Selivanov yselivanov.ml at gmail.com
Sat Sep 3 17:14:34 EDT 2016
- Previous message (by thread): [Python-Dev] PEP 526 ready for review: Syntax for Variable and Attribute Annotations
- Next message (by thread): [Python-Dev] PEP 526 ready for review: Syntax for Variable and Attribute Annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2016-08-30 2:20 PM, Guido van Rossum wrote:
I'm happy to present PEP 526 for your collective review: https://www.python.org/dev/peps/pep-0526/ (HTML) https://github.com/python/peps/blob/master/pep-0526.txt (source)
There's also an implementation ready: https://github.com/ilevkivskyi/cpython/tree/pep-526 I don't want to post the full text here but I encourage feedback on the high-order ideas, including but not limited to - Whether (given PEP 484's relative success) it's worth adding syntax for variable/attribute annotations. - Whether the keyword-free syntax idea proposed here is best: NAME: TYPE TARGET: TYPE = VALUE
I'm in favour for the PEP, and I like the syntax. I find it much better than any previously discussed alternatives.
Static typing is becoming increasingly more popular, and the benefits of using static type checkers for big code bases are clear. The PEP doesn't really change the semantics of the language, it only allows better tooling (using comments for annotations was fine too, but dedicated syntax makes this feature a first class citizen).
Yury
- Previous message (by thread): [Python-Dev] PEP 526 ready for review: Syntax for Variable and Attribute Annotations
- Next message (by thread): [Python-Dev] PEP 526 ready for review: Syntax for Variable and Attribute Annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]