builtins
-- 組込みの関数と例外¶
組込みの関数と例外のすべては、ここで説明します。これらは builtins
モジュール経由でも利用できます。
関数とデータ型¶
- abs()¶
- all()¶
- any()¶
- bin()¶
- class bool¶
- callable()¶
- chr()¶
- classmethod()¶
- compile()¶
- class complex¶
- delattr(obj, name)¶
引数 name は文字列でなければならず、この関数は obj で与えたオブジェクトから、指定された名前の属性を削除します。
- class dict¶
- dir()¶
- divmod()¶
- enumerate()¶
- eval()¶
- exec()¶
- filter()¶
- class float¶
- class frozenset¶
- getattr()¶
- globals()¶
- hasattr()¶
- hash()¶
- hex()¶
- id()¶
- input()¶
- class int¶
- isinstance()¶
- issubclass()¶
- iter()¶
- len()¶
- class list¶
- locals()¶
- map()¶
- max()¶
- class memoryview¶
CPython のドキュメンテーションを参照してください:
memoryview
.
- min()¶
- next()¶
- class object¶
- oct()¶
- open()¶
- ord()¶
- pow()¶
- print()¶
- property()¶
- range()¶
- repr()¶
- reversed()¶
- round()¶
- class set¶
- setattr()¶
- class slice¶
slice 組込み型は、スライスオブジェクトが持つデータ型です。
- sorted()¶
- staticmethod()¶
- class str¶
- sum()¶
- super()¶
- class tuple¶
- type()¶
- zip()¶
例外¶
- exception AssertionError¶
- exception AttributeError¶
- exception Exception¶
- exception ImportError¶
- exception IndexError¶
- exception KeyboardInterrupt¶
CPython のドキュメンテーションを参照してください:
KeyboardInterrupt
.ソフトブリッキング(起動失敗) の記載も参照してください。
- exception KeyError¶
- exception MemoryError¶
- exception NameError¶
- exception NotImplementedError¶
- exception OSError¶
- exception RuntimeError¶
- exception StopIteration¶
- exception SyntaxError¶
- exception SystemExit¶
CPython のドキュメンテーションを参照してください:
SystemExit
.組込み系ではないポート(WindowsやUnixなど)では、処理されない
SystemExit
が発生すると、CPython と同様にMicroPythonプロセスが終了します。一方、組込み系のポートでは、現在のところ処理されない
SystemExit
が発生すると MicroPython の ソフトリセット が行われます。
- exception ValueError¶
- exception ZeroDivisionError¶