New submission from Paolo Lammens <[email protected]>:
Currently, `inspect.signature` doesn't support all callables from the
`operator` module, e.g. `operator.attrgetter`:
```python
>>> import inspect
>>> import operator
>>> inspect.signature(operator.attrgetter("spam"))
ValueError: callable operator.attrgetter('is_host') is not supported by
signature
```
Support for this could be added either directly to `inspect.signature` or by
adding `__signature__` attributes to `operator`'s classes.
----------
components: Library (Lib)
messages: 384061
nosy: plammens
priority: normal
severity: normal
status: open
title: Support operator module callables in inspect.signature
type: enhancement
versions: Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42785>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com