- Glossary - I
- ********
- IDLE
- An Integrated Development and Learning Environment for Python. IDLE
- is a basic editor and interpreter environment which ships with the
- standard distribution of Python.
- immutable
- An object with a fixed value. Immutable objects include numbers,
- strings and tuples. Such an object cannot be altered. A new
- object has to be created if a different value has to be stored.
- They play an important role in places where a constant hash value
- is needed, for example as a key in a dictionary.
- import path
- A list of locations (or *path entries*) that are searched by the
- *path based finder* for modules to import. During import, this list
- of locations usually comes from "sys.path", but for subpackages it
- may also come from the parent package's "__path__" attribute.
- importing
- The process by which Python code in one module is made available to
- Python code in another module.
- importer
- An object that both finds and loads a module; both a *finder* and
- *loader* object.
- interactive
- Python has an interactive interpreter which means you can enter
- statements and expressions at the interpreter prompt, immediately
- execute them and see their results. Just launch "python" with no
- arguments (possibly by selecting it from your computer's main
- menu). It is a very powerful way to test out new ideas or inspect
- modules and packages (remember "help(x)").
- interpreted
- Python is an interpreted language, as opposed to a compiled one,
- though the distinction can be blurry because of the presence of the
- bytecode compiler. This means that source files can be run
- directly without explicitly creating an executable which is then
- run. Interpreted languages typically have a shorter
- development/debug cycle than compiled ones, though their programs
- generally also run more slowly. See also *interactive*.
- interpreter shutdown
- When asked to shut down, the Python interpreter enters a special
- phase where it gradually releases all allocated resources, such as
- modules and various critical internal structures. It also makes
- several calls to the *garbage collector*. This can trigger the
- execution of code in user-defined destructors or weakref callbacks.
- Code executed during the shutdown phase can encounter various
- exceptions as the resources it relies on may not function anymore
- (common examples are library modules or the warnings machinery).
- The main reason for interpreter shutdown is that the "__main__"
- module or the script being run has finished executing.
- iterable
- An object capable of returning its members one at a time. Examples
- of iterables include all sequence types (such as "list", "str", and
- "tuple") and some non-sequence types like "dict", *file objects*,
- and objects of any classes you define with an "__iter__()" method
- or with a "__getitem__()" method that implements *sequence*
- semantics.
- Iterables can be used in a "for" loop and in many other places
- where a sequence is needed ("zip()", "map()", ...). When an
- iterable object is passed as an argument to the built-in function
- "iter()", it returns an iterator for the object. This iterator is
- good for one pass over the set of values. When using iterables, it
- is usually not necessary to call "iter()" or deal with iterator
- objects yourself. The "for" statement does that automatically for
- you, creating a temporary unnamed variable to hold the iterator for
- the duration of the loop. See also *iterator*, *sequence*, and
- *generator*.
- iterator
- An object representing a stream of data. Repeated calls to the
- iterator's "__next__()" method (or passing it to the built-in
- function "next()") return successive items in the stream. When no
- more data are available a "StopIteration" exception is raised
- instead. At this point, the iterator object is exhausted and any
- further calls to its "__next__()" method just raise "StopIteration"
- again. Iterators are required to have an "__iter__()" method that
- returns the iterator object itself so every iterator is also
- iterable and may be used in most places where other iterables are
- accepted. One notable exception is code which attempts multiple
- iteration passes. A container object (such as a "list") produces a
- fresh new iterator each time you pass it to the "iter()" function
- or use it in a "for" loop. Attempting this with an iterator will
- just return the same exhausted iterator object used in the previous
- iteration pass, making it appear like an empty container.
- More information can be found in Iterator Types.
- **CPython implementation detail:** CPython does not consistently
- 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