From ec0290ab39dd5ee6895082559c38fcdc9f0d7ffe Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 4 Dec 2023 18:11:45 +0800 Subject: [PATCH] ... --- python/builtins.py | 4 +++- tests/41_exception.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/builtins.py b/python/builtins.py index 7e371ab4..9e23a81f 100644 --- a/python/builtins.py +++ b/python/builtins.py @@ -256,8 +256,10 @@ def help(obj): print(obj.__signature__) print(obj.__doc__) + class Exception: pass + class classmethod: def __init__(self, f): self.f = f @@ -266,4 +268,4 @@ class classmethod: def staticmethod(f): return f -from _long import long \ No newline at end of file +from _long import long diff --git a/tests/41_exception.py b/tests/41_exception.py index 05bbdd19..63825329 100644 --- a/tests/41_exception.py +++ b/tests/41_exception.py @@ -97,4 +97,5 @@ except Exception as e: assert str(e) == '2' assert repr(e).startswith('KeyError(') except: - exit(1) \ No newline at end of file + exit(1) +