Message242064
> Could we have type slots for the new special methods? Otherwise, implementing the protocol in C would be fairly inefficient, especially for async iteration.
I don't think it's necessary to have slots for __aiter__, __anext__, __aenter__ and __aexit__. Async iteration will never be as fast as regular iteration, and there is plenty overhead in it. And we don't need slots for async context managers as we don't have slots for regular ones.
What might be a good idea is to add a slot for __await__ method -- tp_await. This will allow to implement Futures in C efficiently. I'd rename 'tp_reserved' for this purpose.
Victor, your thoughts? |
|
Date |
User |
Action |
Args |
2015-04-26 17:27:56 | yselivanov | set | recipients:
+ yselivanov, scoder, vstinner, asvetlov |
2015-04-26 17:27:56 | yselivanov | set | messageid: <1430069276.7.0.114099654891.issue24017@psf.upfronthosting.co.za> |
2015-04-26 17:27:56 | yselivanov | link | issue24017 messages |
2015-04-26 17:27:56 | yselivanov | create | |
|