The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Python Glossary: terms starting with letter A
By Guest on 13th November 2022 01:09:11 AM | Syntax: PYTHON | Views: 187



New Paste New paste | Download Paste Download | Toggle Line Numbers Show/Hide line no. | Copy Paste Copy text to clipboard
  1. Glossary
  2. ********
  3.  
  4. ">>>"
  5.    The default Python prompt of the interactive shell.  Often seen for
  6.    code examples which can be executed interactively in the
  7.    interpreter.
  8.  
  9. "..."
  10.    Can refer to:
  11.  
  12.    * The default Python prompt of the interactive shell when entering
  13.      the code for an indented code block, when within a pair of
  14.      matching left and right delimiters (parentheses, square brackets,
  15.      curly braces or triple quotes), or after specifying a decorator.
  16.  
  17.    * The "Ellipsis" built-in constant.
  18.  
  19. 2to3
  20.    A tool that tries to convert Python 2.x code to Python 3.x code by
  21.    handling most of the incompatibilities which can be detected by
  22.    parsing the source and traversing the parse tree.
  23.  
  24.    2to3 is available in the standard library as "lib2to3"; a
  25.    standalone entry point is provided as "Tools/scripts/2to3".  See
  26.    2to3 --- Automated Python 2 to 3 code translation.
  27.  
  28. abstract base class
  29.    Abstract base classes complement *duck-typing* by providing a way
  30.    to define interfaces when other techniques like "hasattr()" would
  31.    be clumsy or subtly wrong (for example with magic methods).  ABCs
  32.    introduce virtual subclasses, which are classes that don't inherit
  33.   from a class but are still recognized by "isinstance()" and
  34.   "issubclass()"; see the "abc" module documentation.  Python comes
  35.   with many built-in ABCs for data structures (in the
  36.   "collections.abc" module), numbers (in the "numbers" module),
  37.   streams (in the "io" module), import finders and loaders (in the
  38.   "importlib.abc" module).  You can create your own ABCs with the
  39.   "abc" module.
  40.  
  41. annotation
  42.   A label associated with a variable, a class attribute or a function
  43.   parameter or return value, used by convention as a *type hint*.
  44.  
  45.   Annotations of local variables cannot be accessed at runtime, but
  46.   annotations of global variables, class attributes, and functions
  47.   are stored in the "__annotations__" special attribute of modules,
  48.   classes, and functions, respectively.
  49.  
  50.   See *variable annotation*, *function annotation*, **PEP 484** and
  51.   **PEP 526**, which describe this functionality. Also see
  52.   Annotations Best Practices for best practices on working with
  53.   annotations.
  54.  
  55. argument
  56.   A value passed to a *function* (or *method*) when calling the
  57.   function.  There are two kinds of argument:
  58.  
  59.   * *keyword argument*: an argument preceded by an identifier (e.g.
  60.     "name=") in a function call or passed as a value in a dictionary
  61.     preceded by "**".  For example, "3" and "5" are both keyword
  62.     arguments in the following calls to "complex()":
  63.  
  64.        complex(real=3, imag=5)
  65.        complex(**{'real': 3, 'imag': 5})
  66.  
  67.   * *positional argument*: an argument that is not a keyword
  68.     argument. Positional arguments can appear at the beginning of an
  69.     argument list and/or be passed as elements of an *iterable*
  70.     preceded by "*". For example, "3" and "5" are both positional
  71.     arguments in the following calls:
  72.  
  73.        complex(3, 5)
  74.        complex(*(3, 5))
  75.  
  76.   Arguments are assigned to the named local variables in a function
  77.   body. See the Calls section for the rules governing this
  78.   assignment. Syntactically, any expression can be used to represent
  79.   an argument; the evaluated value is assigned to the local variable.
  80.  
  81.   See also the *parameter* glossary entry, the FAQ question on the
  82.   difference between arguments and parameters, and **PEP 362**.
  83.  
  84. asynchronous context manager
  85.   An object which controls the environment seen in an "async with"
  86.   statement by defining "__aenter__()" and "__aexit__()" methods.
  87.   Introduced by **PEP 492**.
  88.  
  89. asynchronous generator
  90.   A function which returns an *asynchronous generator iterator*.  It
  91.   looks like a coroutine function defined with "async def" except
  92.   that it contains "yield" expressions for producing a series of
  93.   values usable in an "async for" loop.
  94.  
  95.   Usually refers to an asynchronous generator function, but may refer
  96.   to an *asynchronous generator iterator* in some contexts.  In cases
  97.   where the intended meaning isn't clear, using the full terms avoids
  98.    ambiguity.
  99.  
  100.    An asynchronous generator function may contain "await" expressions
  101.    as well as "async for", and "async with" statements.
  102.  
  103. asynchronous generator iterator
  104.    An object created by a *asynchronous generator* function.
  105.  
  106.    This is an *asynchronous iterator* which when called using the
  107.    "__anext__()" method returns an awaitable object which will execute
  108.    the body of the asynchronous generator function until the next
  109.    "yield" expression.
  110.  
  111.    Each "yield" temporarily suspends processing, remembering the
  112.    location execution state (including local variables and pending
  113.    try-statements).  When the *asynchronous generator iterator*
  114.    effectively resumes with another awaitable returned by
  115.    "__anext__()", it picks up where it left off.  See **PEP 492** and
  116.    **PEP 525**.
  117.  
  118. asynchronous iterable
  119.    An object, that can be used in an "async for" statement. Must
  120.    return an *asynchronous iterator* from its "__aiter__()" method.
  121.    Introduced by **PEP 492**.
  122.  
  123. asynchronous iterator
  124.    An object that implements the "__aiter__()" and "__anext__()"
  125.    methods.  "__anext__" must return an *awaitable* object. "async
  126.   for" resolves the awaitables returned by an asynchronous iterator's
  127.   "__anext__()" method until it raises a "StopAsyncIteration"
  128.   exception.  Introduced by **PEP 492**.
  129.  
  130. attribute
  131.   A value associated with an object which is usually referenced by
  132.   name using dotted expressions. For example, if an object *o* has an
  133.   attribute *a* it would be referenced as *o.a*.
  134.  
  135.   It is possible to give an object an attribute whose name is not an
  136.   identifier as defined by Identifiers and keywords, for example
  137.   using "setattr()", if the object allows it. Such an attribute will
  138.   not be accessible using a dotted expression, and would instead need
  139.   to be retrieved with "getattr()".
  140.  
  141. awaitable
  142.   An object that can be used in an "await" expression.  Can be a
  143.   *coroutine* or an object with an "__await__()" method. See also
  144.   **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
  • Recent Pastes