加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python信息功能:它在哪里?

发布时间:2020-12-20 11:32:38 所属栏目:Python 来源:网络整理
导读:从 Dive into Python开始: Python has a function called info. Try it yourself and skim through the list now. from apihelper import info import __builtin__ info(__builtin__,20)ArithmeticError Base class for arithmetic errors.AssertionError A
从 Dive into Python开始:

Python has a function called info. Try it yourself and skim through
the list now.

>>> from apihelper import info
>>> import __builtin__
>>> info(__builtin__,20)
ArithmeticError      Base class for arithmetic errors.
AssertionError       Assertion failed.
AttributeError       Attribute not found.
EOFError             Read beyond end of file.
EnvironmentError     Base class for I/O related errors.
Exception            Common base class for all exceptions.
FloatingPointError   Floating point operation failed.
IOError              I/O operation failed.

事实证明,Python没有名为info的函数.这本书指的是什么?

解决方法

我不知道为什么Dive Into Python声称“Python有一个叫做info的函数”,但显然不是这样.

apihelper.py(从中导入信息)在本书in section 4.1的前面描述,它只是Mark Pilgrim编写的用于Dive Into Python的模块.该apihelper模块显然确实包含一个信息函数,该函数执行您链接的4.3.3节中声明的内容.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读