Message306346
Currently 2to3 converts `operator.isCallable(obj)` to `hasattr(obj, '__call__')`. This looks cumbersome, and can be deceived by instance attribute __call__. The more correct way is to use `isinstance(obj, collections.abc.Callable)`. Starting from Python 3.2 it can use the callable() builtin. |
|
Date |
User |
Action |
Args |
2017-11-16 09:09:32 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, benjamin.peterson, levkivskyi |
2017-11-16 09:09:32 | serhiy.storchaka | set | messageid: <1510823372.85.0.213398074469.issue32046@psf.upfronthosting.co.za> |
2017-11-16 09:09:32 | serhiy.storchaka | link | issue32046 messages |
2017-11-16 09:09:32 | serhiy.storchaka | create | |
|