[Python-Dev] PEP 492: No new syntax is required (original) (raw)
Glenn Linderman v+python at g.nevcal.com
Tue Apr 28 18:46:53 CEST 2015
- Previous message (by thread): [Python-Dev] PEP 492: No new syntax is required
- Next message (by thread): [Python-Dev] PEP 492: No new syntax is required
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4/26/2015 4:32 PM, Paul Sokolovsky wrote:
Then, is the only logic for proposing aenter is to reinsure against a situation that someone starts to write async context manager, forgets that they write async context manager, and make an enter method there. Then your implementation will announce that "async context manager lacks aenter", whereas "my" approach would announce "Async's manager enter did not return awaitable value".
Again, is that the distinction you're shooting for, or do I miss something?
Seems like the missing aenter can easily be detected by the interpreter at compile time, but the wrong type returned would be at run time, or after a complex type-analysis done at compile time (unlikely to be practical).
So I think you've nailed the distinction... but I'm not the expert. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150428/db917275/attachment.html>
- Previous message (by thread): [Python-Dev] PEP 492: No new syntax is required
- Next message (by thread): [Python-Dev] PEP 492: No new syntax is required
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]