Skip to content

Commit e09a25b

Browse files
committed
Alias iscoroutinefunction
2 parents b98f05f + b008f78 commit e09a25b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python-stdlib/inspect/inspect.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ def getmembers(obj, pred=None):
1414
def isfunction(obj):
1515
return isinstance(obj, type(isfunction))
1616

17-
1817
def isgeneratorfunction(obj):
1918
return isinstance(obj, type(lambda: (yield)))
2019

20+
iscoroutinefunction = isgeneratorfunction
2121

2222
def isgenerator(obj):
2323
return isinstance(obj, type(lambda: (yield)()))
2424

25+
iscoroutine = isgenerator
26+
2527

2628
class _Class:
2729
def meth():

0 commit comments

Comments
 (0)