Message239251
Correctly processing a function's signature involves following the __wrapped__ chains to get to the underlying callable (or to a callable that defines an explicitly modified __signature__ value).
inspect.signature follows these chains automatically, and in 3.4+ inspect.getargspec and inspect.getfullargspec have been updated to use inspect.signature internally.
Using these functions will also allow introspection of builtin and extension module functions that have been processed through Argument Clinic to produce appropriate signature information in their docstrings.
If an IDE or other tool is still producing incorrect signature information for functions wrapped with functools.wraps in 3.4+ then that's either a bug in the affected tool, or else a bug report against the inspect module. |
|
Date |
User |
Action |
Args |
2015-03-25 13:05:36 | ncoghlan | set | recipients:
+ ncoghlan, rhettinger, r.david.murray, productivememberofsociety666 |
2015-03-25 13:05:36 | ncoghlan | set | messageid: <1427288736.6.0.212208866326.issue23764@psf.upfronthosting.co.za> |
2015-03-25 13:05:36 | ncoghlan | link | issue23764 messages |
2015-03-25 13:05:36 | ncoghlan | create | |
|