当我尝试导入Exception的子类时,我得到了ImportError: cannot import name Empty
。这是代码:
文件名:exceptions.py
class Empty(Exception):
"""Error attempting to access an element from an empty container."""
pass
文件名:main.py
from exceptions import Empty
我该如何解决这个问题?