[issue34924] inspect.signature isn't aware that types.MethodType can wrap any callable
Dan Snider
report at bugs.python.org
Sun Oct 7 21:53:51 EDT 2018
New submission from Dan Snider <mr.assume.away at gmail.com>:
I actually noticed this due to it confusingly breaking IDLE call tips and code completion.
>>> import inspect
>>> from types import MethodType
>>> bound_len = MethodType(len, 'abc')
>>> bound_len()
3
>>> inspect.signature(bound_len)
<Signature ()>
>>> inspect.signature(len)
<Signature (obj, /)>
----------
components: Library (Lib)
messages: 327313
nosy: bup
priority: normal
severity: normal
status: open
title: inspect.signature isn't aware that types.MethodType can wrap any callable
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34924>
_______________________________________
More information about the Python-bugs-list
mailing list