- Glossary
- ********
- ">>>"
- The default Python prompt of the interactive shell. Often seen for
- code examples which can be executed interactively in the
- interpreter.
- "..."
- Can refer to:
- * The default Python prompt of the interactive shell when entering
- the code for an indented code block, when within a pair of
- matching left and right delimiters (parentheses, square brackets,
- curly braces or triple quotes), or after specifying a decorator.
- * The "Ellipsis" built-in constant.
- 2to3
- A tool that tries to convert Python 2.x code to Python 3.x code by
- handling most of the incompatibilities which can be detected by
- parsing the source and traversing the parse tree.
- 2to3 is available in the standard library as "lib2to3"; a
- standalone entry point is provided as "Tools/scripts/2to3". See
- 2to3 --- Automated Python 2 to 3 code translation.
- abstract base class
- Abstract base classes complement *duck-typing* by providing a way
- to define interfaces when other techniques like "hasattr()" would
- be clumsy or subtly wrong (for example with magic methods). ABCs
- introduce virtual subclasses, which are classes that don't inherit
- from a class but are still recognized by "isinstance()" and
- "issubclass()"; see the "abc" module documentation. Python comes
- with many built-in ABCs for data structures (in the
- "collections.abc" module), numbers (in the "numbers" module),
- streams (in the "io" module), import finders and loaders (in the
- "importlib.abc" module). You can create your own ABCs with the
- "abc" module.
- annotation
- A label associated with a variable, a class attribute or a function
- parameter or return value, used by convention as a *type hint*.
- Annotations of local variables cannot be accessed at runtime, but
- annotations of global variables, class attributes, and functions
- are stored in the "__annotations__" special attribute of modules,
- classes, and functions, respectively.
- See *variable annotation*, *function annotation*, **PEP 484** and
- **PEP 526**, which describe this functionality. Also see
- Annotations Best Practices for best practices on working with
- annotations.
- argument
- A value passed to a *function* (or *method*) when calling the
- function. There are two kinds of argument:
- * *keyword argument*: an argument preceded by an identifier (e.g.
- "name=") in a function call or passed as a value in a dictionary
- preceded by "**". For example, "3" and "5" are both keyword
- arguments in the following calls to "complex()":
- complex(real=3, imag=5)
- complex(**{'real': 3, 'imag': 5})
- * *positional argument*: an argument that is not a keyword
- argument. Positional arguments can appear at the beginning of an
- argument list and/or be passed as elements of an *iterable*
- preceded by "*". For example, "3" and "5" are both positional
- arguments in the following calls:
- complex(3, 5)
- complex(*(3, 5))
- Arguments are assigned to the named local variables in a function
- body. See the Calls section for the rules governing this
- assignment. Syntactically, any expression can be used to represent
- an argument; the evaluated value is assigned to the local variable.
- See also the *parameter* glossary entry, the FAQ question on the
- difference between arguments and parameters, and **PEP 362**.
- asynchronous context manager
- An object which controls the environment seen in an "async with"
- statement by defining "__aenter__()" and "__aexit__()" methods.
- Introduced by **PEP 492**.
- asynchronous generator
- A function which returns an *asynchronous generator iterator*. It
- looks like a coroutine function defined with "async def" except
- that it contains "yield" expressions for producing a series of
- values usable in an "async for" loop.
- Usually refers to an asynchronous generator function, but may refer
- to an *asynchronous generator iterator* in some contexts. In cases
- where the intended meaning isn't clear, using the full terms avoids
- ambiguity.
- An asynchronous generator function may contain "await" expressions
- as well as "async for", and "async with" statements.
- asynchronous generator iterator
- An object created by a *asynchronous generator* function.
- This is an *asynchronous iterator* which when called using the
- "__anext__()" method returns an awaitable object which will execute
- the body of the asynchronous generator function until the next
- "yield" expression.
- Each "yield" temporarily suspends processing, remembering the
- location execution state (including local variables and pending
- try-statements). When the *asynchronous generator iterator*
- effectively resumes with another awaitable returned by
- "__anext__()", it picks up where it left off. See **PEP 492** and
- **PEP 525**.
- asynchronous iterable
- An object, that can be used in an "async for" statement. Must
- return an *asynchronous iterator* from its "__aiter__()" method.
- Introduced by **PEP 492**.
- asynchronous iterator
- An object that implements the "__aiter__()" and "__anext__()"
- methods. "__anext__" must return an *awaitable* object. "async
- for" resolves the awaitables returned by an asynchronous iterator's
- "__anext__()" method until it raises a "StopAsyncIteration"
- exception. Introduced by **PEP 492**.
- attribute
- A value associated with an object which is usually referenced by
- name using dotted expressions. For example, if an object *o* has an
- attribute *a* it would be referenced as *o.a*.
- It is possible to give an object an attribute whose name is not an
- identifier as defined by Identifiers and keywords, for example
- using "setattr()", if the object allows it. Such an attribute will
- not be accessible using a dotted expression, and would instead need
- to be retrieved with "getattr()".
- awaitable
- An object that can be used in an "await" expression. Can be a
- *coroutine* or an object with an "__await__()" method. See also
- **PEP 492**.
Python software and documentation are licensed under the PSF License Agreement.
Starting with Python 3.8.6, examples, recipes, and other code in the documentation are dual licensed under the PSF License Agreement and the Zero-Clause BSD license.
Some software incorporated into Python is under different licenses. The licenses are listed with code falling under that license. See Licenses and Acknowledgements for Incorporated Software for an incomplete list of these licenses.
Python and it's documentation is:
Copyright © 2001-2022 Python Software Foundation. All rights reserved.
Copyright © 2000 BeOpen.com. All rights reserved.
Copyright © 1995-2000 Corporation for National Research Initiatives. All rights reserved.
Copyright © 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
See History and License for complete license and permissions information:
https://docs.python.org/3/license.html#psf-license