[issue34802] asyncio.iscoroutine() documentation is wrong

2018-09-27 Thread Gefn


Gefn  added the comment:

I think it's much clearer

--

___
Python tracker 
<https://bugs.python.org/issue34802>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34802] asyncio.iscoroutine() documentation is wrong

2018-09-25 Thread Gefn


New submission from Gefn :

The documentation states that "This method is different from 
inspect.iscoroutine() because it returns True for generator-based coroutines 
decorated with @coroutine."

It seems to be wrong, a method written as follow:

def test(): yield 1

will be evaluated as a coroutine by asyncio.iscoroutine(), even if not 
decorated. The old doc stated "Return True if obj is a coroutine object, which 
may be based on a generator or an async def coroutine.", which seems more 
correct.

--
messages: 326404
nosy: Gefn
priority: normal
severity: normal
status: open
title: asyncio.iscoroutine() documentation is wrong
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue34802>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com