Built-in functions — Python 3.15.2 documentation
Code objects can be executed by exec() or eval() . source can either be a normal string, a byte string, or an AST object. Refer to the ast module documentation ...
Code objects can be executed by exec() or eval() . source can either be a normal string, a byte string, or an AST object. Refer to the ast module documentation ...
Return the string representing a character whose Unicode code point is the integer i. For example, chr(97) returns the string 'a', while chr(8364) returns the string '€'. This is the inverse of ord(). The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in base 16).
Source code: Lib/os.py This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see ...
| Byte Array Objects¶. type PyByteArrayObject¶. This subtype of PyObject represents a Python bytearray object.Return the contents of bytearray as a char array after checking for a NULL pointer. The returned array always has an extra null byte appended.
Oct 9, 2026 ... 最大的变化包括惰性导入, 冻结字典 和哨兵 内置类型, UTF-8 作为默认编码格式, 推导式内解包,以及针对自由线程构建版的稳定ABI。 标准库的变化包括新的 ...
Future versions of Python may add types to the type hierarchy (e.g., rational numbers, efficiently stored arrays of integers, etc.), although such additions will often be provided via the standard library instead. Some of the type descriptions below contain a paragraph listing ‘special attributes.’
Symbols · comment, [1], [2] · in doctests · in printf-style formatting, [1] · in regular expressions · in string formatting · source encoding declaration.
It helps to have a Python interpreter handy for hands-on experience, but all examples are self-contained, so the tutorial can be read off-line as well. For a description of standard objects and modules, see Python built-ins reference and The Python standard library.
To clarify the above rules, here’s some example Python code, equivalent to the built-in hash, for computing the hash of a rational number, float, or complex: import sys, math.
主な変更には、遅延インポート、組み込み型 frozendict と sentinel、デフォルトのエンコーディングの UTF-8 化、内包表記でのアンパック、フリースレッドビルド向けの安定 ...
(exclamation mark). in formatted string literal ! (pdb command) ! (エクスクラメーション). curses モジュール内 · glob 形式のワイルドカード, [1] ...