On Thu, Sep 1, 2016 at 10:01 AM, Koos Zevenhoven <k7ho...@gmail.com> wrote: > On Thu, Sep 1, 2016 at 5:46 PM, Guido van Rossum <gu...@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) _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com