Advertisement
Turketto

Untitled

Feb 25th, 2022
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. pi@raspberrypi:~ $ python3
  2. Python 3.7.3 (default, Jan 22 2021, 20:04:44)
  3. [GCC 8.3.0] on linux
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> class Exc(BaseException):
  6. ... def __new__(cls, *args, **kwargs):
  7. ... return Exc()
  8. ...
  9. >>> def gen():
  10. ... yield
  11. ...
  12. >>> gen().throw(Exc)
  13. Traceback (most recent call last):
  14. File "<stdin>", line 1, in <module>
  15. File "<stdin>", line 1, in gen
  16. File "<stdin>", line 3, in __new__
  17. File "<stdin>", line 3, in __new__
  18. File "<stdin>", line 3, in __new__
  19. [Previous line repeated 496 more times]
  20. RecursionError: maximum recursion depth exceeded while calling a Python object
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement