Message306346
| Author | serhiy.storchaka |
|---|---|
| Recipients | benjamin.peterson, levkivskyi, serhiy.storchaka |
| Date | 2017-11-16.09:09:32 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1510823372.85.0.213398074469.issue32046@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| 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 | |