[Python-Dev] PEP 484 update proposal: annotating decorated declarations (original) (raw)
Koos Zevenhoven k7hoven at gmail.com
Fri Jun 2 12:41:16 EDT 2017
- Previous message (by thread): [Python-Dev] PEP 484 update proposal: annotating decorated declarations
- Next message (by thread): [Python-Dev] PEP 484 update proposal: annotating decorated declarations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Jun 2, 2017 at 6:34 PM, Naomi Seyfer <naomi at seyfer.org> wrote:
Yep, interested in implementing it! I will put implementation time on my schedule and tell y'all when it is, for holding myself accountable -- it turns out I never do anything not on my schedule.
I still don't understand what would happen with annotations. If the decorator returns a non-function, one would expect the annotations to be in the annotations attribute of the enclosing class or module. If it returns a function, they would be in the annotations attribute of the function. And I'm talking about the runtime behavior in Python as explained in PEP484 and PEP526. I would expect these declarations to behave according to the same principles as other ways to annotate variables/functions. If there is no runtime behavior, a comment-based syntax might be more appropriate. Or have I missed something?
—Koos
--
- Koos Zevenhoven + http://twitter.com/k7hoven +
- Previous message (by thread): [Python-Dev] PEP 484 update proposal: annotating decorated declarations
- Next message (by thread): [Python-Dev] PEP 484 update proposal: annotating decorated declarations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]