[issue41813] Clarify specification of object.__await__

2020-09-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue41813] Clarify specification of object.__await__

2020-09-19 Thread Paolo Lammens
Paolo Lammens added the comment: The proposed addition (see attached PR) is the following note: .. note:: The language doesn't place any restriction on the type or value of the objects yielded by the iterator returned by :meth:`__await__`, as this is specific to the impl

[issue41813] Clarify specification of object.__await__

2020-09-19 Thread Paolo Lammens
Change by Paolo Lammens : -- keywords: +patch pull_requests: +21365 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22320 ___ Python tracker ___ __

[issue41813] Clarify specification of object.__await__

2020-09-19 Thread Paolo Lammens
New submission from Paolo Lammens : The current specification of object.__await__ is just: > `object.__await__(self)` > > Must return an iterator. Should be used to implement awaitable objects. For > instance, `asyncio.Future` implements this method to be compatible with the > await expressio