Guido van Rossum added the comment:

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)
```

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24018>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to