返回介绍

Builtin functions and exceptions

发布于 2021-05-01 04:38:18 字数 3036 浏览 797 评论 0 收藏 0

所有的内饰函数和异常类型都在下面描述。

函数和类型

  • abs()
  • all()
  • any()
  • bin()
  • class bool
  • class bytearray
  • class bytes
  • callable()
  • chr()
  • classmethod()
  • compile()
  • class complex
  • delattr(obj, name)

  • class dict

  • dir()

  • divmod()

  • enumerate()
  • eval()
  • exec()
  • filter()
  • class float
  • class frozenset
  • getattr()
  • globals()
  • hasattr()
  • hash()
  • hex()
  • id()
  • input()
  • class int
  • classmethod from_bytes(bytes, byteorder) In MicroPython, byteorder parameter must be positional (this is compatible with CPython).
  • to_bytes(size, byteorder) In MicroPython, byteorder parameter must be positional (this is compatible with CPython).

  • isinstance()

  • issubclass()
  • iter()
  • len()
  • class list
  • locals()
  • map()
  • max()
  • class memoryview
  • min()
  • next()
  • class object
  • oct()
  • open()
  • ord()
  • pow()
  • print()
  • property()
  • range()
  • repr()
  • reversed()
  • round()
  • class set
  • setattr()
  • class slice
  • The slice builtin is the type that slice objects have.
  • sorted()
  • staticmethod()
  • class str
  • sum()
  • super()
  • class tuple
  • type()
  • zip()

异常类型

  • exception AssertionError
  • exception AttributeError
  • exception Exception
  • exception ImportError
  • exception IndexError
  • exception KeyboardInterrupt
  • exception KeyError
  • exception MemoryError
  • exception NameError
  • exception NotImplementedError
  • exception OSError
  • See CPython documentation: OSError. MicroPython doesn’t implement errno attribute, instead use the standard way to access exception arguments: exc.args[0].

  • exception RuntimeError

  • exception StopIteration
  • exception SyntaxError
  • exception SystemExit
  • See CPython documentation: SystemExit.

  • exception TypeError

  • See CPython documentation: TypeError.

  • exception ValueError

  • exception ZeroDivisionError

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文