On Python 2, getting a method from a class returns an unbound method, with a
reference to the wrapped function stored in `__func__`.
On Pyhon 3, getting a method from a class returns the function itself.
On Python 2.6+, `im_func` is also available as `__func__`, so we can change it
to
```Python
if (getattr(fn.add_input, '__func__', None)
is is getattr(core.CombineFn.add_input, '__func__',
core.CombineFn.add_input)):
```
if this is more clear.
[ Full content available at: https://github.com/apache/beam/pull/6424 ]
This message was relayed via gitbox.apache.org for [email protected]