diff options
author | Tomas R. <tomas.roun8@gmail.com> | 2024-12-03 16:08:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-03 16:08:39 (GMT) |
commit | 8ba9f5bca9c0ce6130e1f4ba761a68f74f8457d0 (patch) | |
tree | 16e7ab36bd779602983dc8564ee490182988acb4 /Lib | |
parent | 412e11fe6e37f15971ef855f88b8b01bb3297679 (diff) | |
download | cpython-8ba9f5bca9c0ce6130e1f4ba761a68f74f8457d0.zip cpython-8ba9f5bca9c0ce6130e1f4ba761a68f74f8457d0.tar.gz cpython-8ba9f5bca9c0ce6130e1f4ba761a68f74f8457d0.tar.bz2 |
gh-127347: Document `traceback.print_list` (#127348)
Previously, `traceback.print_list` didn't have a documentation entry and was not exposed in `traceback.__all__`. Now it has a documentation entry and is exposed in `__all__`.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_traceback.py | 3 | ||||
-rw-r--r-- | Lib/traceback.py | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index ec69412..ea8d9f2 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -4488,9 +4488,8 @@ class MiscTest(unittest.TestCase): def test_all(self): expected = set() - denylist = {'print_list'} for name in dir(traceback): - if name.startswith('_') or name in denylist: + if name.startswith('_'): continue module_object = getattr(traceback, name) if getattr(module_object, '__module__', None) == 'traceback': diff --git a/Lib/traceback.py b/Lib/traceback.py index f731492..6367c00 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -15,7 +15,7 @@ __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_tb', 'print_exc', 'format_exc', 'print_exception', 'print_last', 'print_stack', 'print_tb', 'clear_frames', 'FrameSummary', 'StackSummary', 'TracebackException', - 'walk_stack', 'walk_tb'] + 'walk_stack', 'walk_tb', 'print_list'] # # Formatting and printing lists of traceback lines. |