Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 2 years ago

Language

Python

Compiler

CPython 3.12.1

Options

Author

anonymous

almost 2 years ago

$ python3 prog.py
Traceback (most recent call last):
  File "/home/jail/prog.py", line 5, in abc
    raise StopIteration(123) # works, but doesn't since no wrapper
    ^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration: 123

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/jail/prog.py", line 15, in <module>
    asyncio.run(main())
  File "/opt/wandbox/cpython-3.12.1/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/wandbox/cpython-3.12.1/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/wandbox/cpython-3.12.1/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/jail/prog.py", line 12, in main
    async for i in abc(): 
    ^^^^^^^^^^^^^^^^^^^^^
RuntimeError: async generator raised StopIteration
Exit Code:
1