diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/timeit.rst | 2 | ||||
-rw-r--r-- | Doc/library/traceback.rst | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index a487917..0cc1586 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -151,7 +151,7 @@ The module defines three convenience functions and a public class: t = Timer(...) # outside the try/except try: t.timeit(...) # or t.repeat(...) - except: + except Exception: t.print_exc() The advantage over the standard traceback is that source lines in the diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index 32e5733..0533bea 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -146,7 +146,7 @@ module. :: source = input(">>> ") try: exec(source, envdir) - except: + except Exception: print("Exception in user code:") print("-"*60) traceback.print_exc(file=sys.stdout) |