Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi:~ $ python3
- Python 3.7.3 (default, Jan 22 2021, 20:04:44)
- [GCC 8.3.0] on linux
- Type "help", "copyright", "credits" or "license" for more information.
- >>> class Exc(BaseException):
- ... def __new__(cls, *args, **kwargs):
- ... return Exc()
- ...
- >>> def gen():
- ... yield
- ...
- >>> gen().throw(Exc)
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "<stdin>", line 1, in gen
- File "<stdin>", line 3, in __new__
- File "<stdin>", line 3, in __new__
- File "<stdin>", line 3, in __new__
- [Previous line repeated 496 more times]
- RecursionError: maximum recursion depth exceeded while calling a Python object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement