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 I
By Guest on 13th November 2022 08:07:08 AM | Syntax: PYTHON | Views: 214



New Paste New paste | Download Paste Download | Toggle Line Numbers Show/Hide line no. | Copy Paste Copy text to clipboard
  1. Glossary - I
  2. ********
  3.  
  4. IDLE
  5.    An Integrated Development and Learning Environment for Python. IDLE
  6.    is a basic editor and interpreter environment which ships with the
  7.    standard distribution of Python.
  8.  
  9. immutable
  10.    An object with a fixed value.  Immutable objects include numbers,
  11.    strings and tuples.  Such an object cannot be altered.  A new
  12.    object has to be created if a different value has to be stored.
  13.    They play an important role in places where a constant hash value
  14.    is needed, for example as a key in a dictionary.
  15.  
  16. import path
  17.    A list of locations (or *path entries*) that are searched by the
  18.    *path based finder* for modules to import. During import, this list
  19.    of locations usually comes from "sys.path", but for subpackages it
  20.    may also come from the parent package's "__path__" attribute.
  21.  
  22. importing
  23.   The process by which Python code in one module is made available to
  24.   Python code in another module.
  25.  
  26. importer
  27.   An object that both finds and loads a module; both a *finder* and
  28.   *loader* object.
  29.  
  30. interactive
  31.   Python has an interactive interpreter which means you can enter
  32.   statements and expressions at the interpreter prompt, immediately
  33.   execute them and see their results.  Just launch "python" with no
  34.   arguments (possibly by selecting it from your computer's main
  35.    menu). It is a very powerful way to test out new ideas or inspect
  36.    modules and packages (remember "help(x)").
  37.  
  38. interpreted
  39.    Python is an interpreted language, as opposed to a compiled one,
  40.    though the distinction can be blurry because of the presence of the
  41.    bytecode compiler.  This means that source files can be run
  42.    directly without explicitly creating an executable which is then
  43.    run. Interpreted languages typically have a shorter
  44.    development/debug cycle than compiled ones, though their programs
  45.    generally also run more slowly.  See also *interactive*.
  46.  
  47. interpreter shutdown
  48.    When asked to shut down, the Python interpreter enters a special
  49.    phase where it gradually releases all allocated resources, such as
  50.    modules and various critical internal structures.  It also makes
  51.    several calls to the *garbage collector*. This can trigger the
  52.    execution of code in user-defined destructors or weakref callbacks.
  53.    Code executed during the shutdown phase can encounter various
  54.    exceptions as the resources it relies on may not function anymore
  55.    (common examples are library modules or the warnings machinery).
  56.  
  57.    The main reason for interpreter shutdown is that the "__main__"
  58.    module or the script being run has finished executing.
  59.  
  60. iterable
  61.    An object capable of returning its members one at a time. Examples
  62.    of iterables include all sequence types (such as "list", "str", and
  63.    "tuple") and some non-sequence types like "dict", *file objects*,
  64.    and objects of any classes you define with an "__iter__()" method
  65.    or with a "__getitem__()" method that implements *sequence*
  66.    semantics.
  67.  
  68.    Iterables can be used in a "for" loop and in many other places
  69.    where a sequence is needed ("zip()", "map()", ...).  When an
  70.    iterable object is passed as an argument to the built-in function
  71.    "iter()", it returns an iterator for the object.  This iterator is
  72.    good for one pass over the set of values.  When using iterables, it
  73.    is usually not necessary to call "iter()" or deal with iterator
  74.    objects yourself.  The "for" statement does that automatically for
  75.    you, creating a temporary unnamed variable to hold the iterator for
  76.    the duration of the loop.  See also *iterator*, *sequence*, and
  77.    *generator*.
  78.  
  79. iterator
  80.    An object representing a stream of data.  Repeated calls to the
  81.    iterator's "__next__()" method (or passing it to the built-in
  82.   function "next()") return successive items in the stream.  When no
  83.   more data are available a "StopIteration" exception is raised
  84.   instead.  At this point, the iterator object is exhausted and any
  85.   further calls to its "__next__()" method just raise "StopIteration"
  86.   again.  Iterators are required to have an "__iter__()" method that
  87.   returns the iterator object itself so every iterator is also
  88.   iterable and may be used in most places where other iterables are
  89.   accepted.  One notable exception is code which attempts multiple
  90.   iteration passes.  A container object (such as a "list") produces a
  91.   fresh new iterator each time you pass it to the "iter()" function
  92.   or use it in a "for" loop.  Attempting this with an iterator will
  93.   just return the same exhausted iterator object used in the previous
  94.   iteration pass, making it appear like an empty container.
  95.  
  96.   More information can be found in Iterator Types.
  97.  
  98.   **CPython implementation detail:** CPython does not consistently
  99.   apply the requirement that an iterator define "__iter__()".
















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