Return true if the object is a user-defined generator function. Generator function objects provide the same attributes as functions. See help(isfunction) for a list of attributes.
(obj)
| 296 | return bool(f.__code__.co_flags & flag) |
| 297 | |
| 298 | def isgeneratorfunction(obj): |
| 299 | """Return true if the object is a user-defined generator function. |
| 300 | |
| 301 | Generator function objects provide the same attributes as functions. |
| 302 | See help(isfunction) for a list of attributes.""" |
| 303 | return _has_code_flag(obj, CO_GENERATOR) |
| 304 | |
| 305 | # A marker for markcoroutinefunction and iscoroutinefunction. |
| 306 | _is_coroutine_mark = object() |
nothing calls this directly
no test coverage detected
searching dependent graphs…