Skip to content
murmot

Results for “python function reference statement site:docs.python.org code”

  • docs.python.org

    8. Compound statements — Python 3.15.2 documentation

    The Python Language Reference ». 8. Compound statements.A function definition is an executable statement. Its execution binds the function name in the current local namespace to a function object (a wrapper around the executable code for the function).

  • docs.python.org

    8. Errors and Exceptions — Python 3.15.2 documentation

    8.2. Exceptions¶. Even if a statement or expression is syntactically correct, it may cause an error when an attempt is made to execute it. Errors detected during execution are called exceptions and are not unconditionally fatal: you will soon learn how to handle them in Python programs.

  • docs.python.org

    Built-in Functions — Python 3.11.18 documentation

    This function raises SyntaxError if the compiled source is invalid, and ValueError if the source contains null bytes. If you want to parse Python code into its AST representation, see ast.parse(). Raises an auditing event compile with arguments source and filename.

  • docs.python.org

    Python 3.15.2 documentation

    20 hours ago · What's new in Python 3.15? Or all "What's new" documents since Python 2.0 Tutorial Start here: a tour of Python's syntax and features 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 ...

  • docs.python.org

    9. Classes — Python 3.15.2 documentation

    As in Modula-3, there are no shorthands for referencing the object’s members from its methods: the method function is declared with an explicit first argument representing the object, which is provided implicitly by the call. As in Smalltalk, classes themselves are objects.

  • docs.python.org

    5. Data Structures — Python 3.15.2 documentation

    Python also includes a data type for sets. A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also support mathematical operations like union, intersection, difference, and symmetric difference.

  • docs.python.org

    5. The import system — Python 3.15.2 documentation

    1 day ago · 5. The import system ¶ Python code in one module gains access to the code in another module by the process of importing it. The import statement is the most common way of invoking the import machinery, but it is not the only way. Functions such as importlib.import_module () and built-in __import__ () can also be used to invoke the import machinery. An eager import statement performs two ...