Hi, 2015-04-23 17:54 GMT+02:00 Yury Selivanov <yselivanov...@gmail.com>: > Greg wants to implement __cocall__ on futures. This way > you'll be able to write > > cocall fut() # instead of "await fut"
Oh, I missed something in the PEP 3152: a obj__cocall__() method can be an iterator/generator, it can be something different than a cofunction. So a __cocall__() *can* use yield and yield from. But to use cocall, it must be a cofunction. It's not easy to understand the whole puzzle. IMO the PEP 492 better explains how pieces are put together ;-) Victor _______________________________________________ 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