mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
* Setting the __module__ attribute for a class now removes the __firstlineno__ item from the type's dict. * The _collections_abc and _pydecimal modules now completely replace the collections.abc and decimal modules after importing them. This allows to get the source of classes and functions defined in these modules. * inspect.findsource() now checks whether the first line number for a class is out of bound.
4 lines
260 B
ReStructuredText
4 lines
260 B
ReStructuredText
Fix :func:`inspect.getsource` for classes in :mod:`collections.abc` and
|
|
:mod:`decimal` (for pure Python implementation) modules.
|
|
:func:`inspect.getcomments` now raises OSError instead of IndexError if the
|
|
``__firstlineno__`` value for a class is out of bound.
|