Message241716
Is it an option to leave inspect alone? Its definition and use of generators is very focused on the builtin implementation.
Although this means that code that wants to do the right thing but also be backwards compatible has to use something like
```
def isgen(g):
if hasattr(collections.abc, 'Generator'):
return isinstance(c, collections.abc.Generator)
else:
return inspect.isgenerator(g)
``` |
|
Date |
User |
Action |
Args |
2015-04-21 15:19:31 | gvanrossum | set | recipients:
+ gvanrossum, rhettinger, pitrou, scoder, vstinner, lukasz.langa, martin.panter, yselivanov |
2015-04-21 15:19:31 | gvanrossum | set | messageid: <1429629571.48.0.0289996634976.issue24018@psf.upfronthosting.co.za> |
2015-04-21 15:19:31 | gvanrossum | link | issue24018 messages |
2015-04-21 15:19:31 | gvanrossum | create | |
|