[Python-Dev] PEP 526 ready for review: Syntax for Variable and Attribute Annotations (original) (raw)
Guido van Rossum guido at python.org
Thu Sep 1 16:25:17 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 Thu, Sep 1, 2016 at 10:01 AM, Koos Zevenhoven <k7hoven at gmail.com> wrote:
On Thu, Sep 1, 2016 at 5:46 PM, Guido van Rossum <guido at python.org> wrote:
IOW, PEP 3157 is not dead yet. Indeed.
PEP 3157? Is that a typo or is there such a thing somewhere?
Sorry, 3107 (the original Function Annotations PEP).
[...] I hope there will at least be a recommendation somewhere (PEP 8?) to not mix the two styles of attribute annotation (beginning of class / in method). The whole readability benefit turns against itself if there are some non-ClassVar variables annotated outside init and then the rest somewhere in init and in whatever initialization helper methods init happens to call.
Yeah, but then again, in general I don't believe you can legislate the writing of readable code using crude syntactic means. Not mixing the two in the same class sounds like pretty good advice though, and a linter should be able to catch that easily.
-- --Guido van Rossum (python.org/~guido)
- 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 ]