Improve descriptions of introspection changes

Several of the introspection changes in Python 3.4 are indirect,
where inspect module changes affected pydoc, and those in turn
affected the help builtin. This update adds versionchanged
notes in the key locations, as well as more coverage in the
What's New document (in particular, a note in the porting
section regarding the expanded domain for inspect.getfullargspec).
This commit is contained in:
Nick Coghlan 2014-03-08 16:36:37 +10:00
parent 8591563628
commit 1635578d5f
4 changed files with 59 additions and 8 deletions

View file

@ -610,6 +610,10 @@ are always available. They are listed here in alphabetical order.
This function is added to the built-in namespace by the :mod:`site` module.
.. versionchanged:: 3.4
Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported
signatures for callables are now more comprehensive and consistent.
.. function:: hex(x)

View file

@ -729,6 +729,11 @@ Classes and functions
Consider using the new :ref:`Signature Object <inspect-signature-object>`
interface, which provides a better way of introspecting functions.
.. versionchanged:: 3.4
This function is now based on :func:`signature`, but still ignores
``__wrapped__`` attributes and includes the already bound first
parameter in the signature output for bound methods.
.. function:: getargvalues(frame)

View file

@ -84,3 +84,8 @@ Reference Manual pages.
.. versionchanged:: 3.2
Added the ``-b`` option, deprecated the ``-g`` option.
.. versionchanged:: 3.4
:mod:`pydoc` now uses :func:`inspect.signature` rather than
:func:`inspect.getfullargspec` to extract signature information from
callables.