cpython/Misc/NEWS.d/next/Library/2021-07-15-16-51-32.bpo-44648.2o49TB.rst
Miss Islington (bot) f468ede4a2
bpo-44648: Fix error type in inspect.getsource() in interactive session (GH-27171) (GH-27495)
(cherry picked from commit 48a62559df)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-30 19:46:42 +02:00

3 lines
200 B
ReStructuredText

Fixed wrong error being thrown by :func:`inspect.getsource` when examining a
class in the interactive session. Instead of :exc:`TypeError`, it should be
:exc:`OSError` with appropriate error message.