New submission from Dan Snider <mr.assume.a...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue34924>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to