Built-in functions — Python 3.15.2 documentation
Syntax errors are reported as exceptions. Warning. This function executes arbitrary code. Calling it with untrusted user-supplied input will lead to security ...
Syntax errors are reported as exceptions. Warning. This function executes arbitrary code. Calling it with untrusted user-supplied input will lead to security ...
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).
Only move imports into a local scope, such as inside a function definition, if it's necessary to solve a problem such as avoiding a circular import or are ...
AttributeError: module 'numpy' has no attribute 'array' (consider renaming '/home/me/numpy.py' if it has the same name as a library you intended to import). (Contributed by Shantanu Jain in gh-95754.)
Function objects also support getting and setting arbitrary attributes, which can be used, for example, to attach metadata to functions. Regular attribute dot- ...
Command-line option and argument parsing library. array. Space efficient arrays of uniformly typed numeric values.Tool for detecting white space related problems in Python source files in a directory tree. tarfile. Read and write tar-format archive files.
This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed ...
Just like '*', all command-line arguments present are gathered into a list. Additionally, an error message will be generated if there wasn’t at least one command-line argument present. For example
... command-line option to Python). For example: Copy >>> str(b'Zoot!') "b'Zoot ... capwords() function does not have this problem, as it splits words on spaces only.
The standard Python distribution includes a lot of additional code. There are modules to read Unix mailboxes, retrieve documents via HTTP, generate random numbers, parse command-line options, compress data, and many other tasks.
The following example demonstrates a practical use of the SharedMemory class with NumPy arrays, accessing the same numpy.ndarray from two distinct Python shells ...