跳转到主要内容

Python的Haiku错误信息

项目描述

无错误生活无意义 没有斗争,没有喜悦

~ (Brian M. Porter)

haiku-errors

只需导入haiku_errors,当未处理异常时即可打印Haiku。

$ python -c "import haiku_errors; raise SystemError"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
SystemError

    Something has gone wrong.
    Format your disk, because this
    Error won't help you.
    ~ (Cheryl Walker)

一行示例,无需显式raise

$ python3 -c "import haiku_errors; f = lambda: f(); f()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
LookupError

    The ten thousand things,
    How long do any persist?
    Netscape, too, has gone.
    ~ (Jason Willoughby)

要安装,请运行

$ pip install haiku-errors

项目详情


下载文件

下载适合您平台的文件。如果您不确定要选择哪个,请了解有关安装软件包的更多信息。

源代码分发

haiku-errors-0.3.0.tar.gz (3.8 kB 查看哈希值)

上传时间: 源代码

构建分发

haiku_errors-0.3.0-py2.py3-none-any.whl (5.5 kB 查看哈希值)

上传时间: Python 2 Python 3

由以下支持