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 ...
Built-ins reference Built-in functions and classes. Library reference Standard library modules. Language reference Syntax and language elements. Python setup and usage How to install, configure, and use Python.
For an informal introduction to the language, see The Python Tutorial. For C or C++ programmers, two additional manuals exist: Extending and Embedding the ...
This function supports dynamic execution of Python code. object must be either a string or a code object. If it is a string, the string is parsed as a suite of Python statements which is then executed (unless a syntax error occurs).
This library reference manual describes the standard library distributed with Python. It also describes some of the optional components that are commonly ...
Generate byte-code files from Python source files. pyclbr. Supports information extraction for a Python module browser.Interface to the compiler's internal symbol tables. sys. Access system-specific parameters and functions.
A simple example¶ · logging module, like · logging.debug , rather than creating a logger and calling functions on it. These functions operate on the root logger, ...
In an application embedding Python, this should be called before using any other Python/C API functions; see Before Python Initialization for the few exceptions. This initializes the table of loaded modules (sys.modules), and creates the fundamental modules builtins, __main__ and sys.
The list of command line arguments passed to a Python script. argv[0] is the script name (it is operating system dependent whether this is a full pathname or ...
For example, some objects are immortal and have a very high refcount that does not reflect the actual number of references. Consequently, do not rely on the returned value to be accurate, other than a value of 0 or 1. Use the Py_SET_REFCNT() function to set an object reference count.
Return x with the fractional part removed, leaving the integer part. This rounds toward 0: trunc() is equivalent to floor() for positive x, and equivalent to ...
User code can raise built-in exceptions. This can be used to test an exception handler or to report an error condition “just like” the situation in which the ...