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)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4