diff --git a/Doc/glossary.rst b/Doc/glossary.rst --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -524,16 +524,18 @@ Glossary for a member during lookup. See `The Python 2.3 Method Resolution Order `_. module An object that serves as an organizational unit of Python code. Modules have a namespace containing arbitrary Python objects. Modules are loaded into Python by the process of :term:`importing`. + See also :term:`package`. + MRO See :term:`method resolution order`. mutable Mutable objects can change their value but keep their :func:`id`. See also :term:`immutable`. named tuple @@ -562,16 +564,18 @@ Glossary modules, respectively. namespace package A :pep:`420` :term:`package` which serves only as a container for subpackages. Namespace packages may have no physical representation, and specifically are not like a :term:`regular package` because they have no ``__init__.py`` file. + See also :term:`module`. + nested scope The ability to refer to a variable in an enclosing definition. For instance, a function defined inside another function can refer to variables in the outer function. Note that nested scopes by default work only for reference and not for assignment. Local variables both read and write in the innermost scope. Likewise, global variables read and write to the global namespace. The :keyword:`nonlocal` allows writing to outer scopes. @@ -583,20 +587,22 @@ Glossary :meth:`__getattribute__`, class methods, and static methods. object Any data with state (attributes or value) and defined behavior (methods). Also the ultimate base class of any :term:`new-style class`. package - A Python module which can contain submodules or recursively, + A Python :term:`module` which can contain submodules or recursively, subpackages. Technically, a package is a Python module with an ``__path__`` attribute. + See also :term:`regular package` and :term:`namespace package`. + parameter A named entity in a :term:`function` (or method) definition that specifies an :term:`argument` (or in some cases, arguments) that the function can accept. There are five types of parameters: * :dfn:`positional-or-keyword`: specifies an argument that can be passed either :term:`positionally ` or as a :term:`keyword argument `. This is the default kind of parameter, for example *foo* @@ -732,16 +738,18 @@ Glossary :term:`CPython` implementation. The :mod:`sys` module defines a :func:`~sys.getrefcount` function that programmers can call to return the reference count for a particular object. regular package A traditional :term:`package`, such as a directory containing an ``__init__.py`` file. + See also :term:`namespace package`. + __slots__ A declaration inside a class that saves memory by pre-declaring space for instance attributes and eliminating instance dictionaries. Though popular, the technique is somewhat tricky to get right and is best reserved for rare cases where there are large numbers of instances in a memory-critical application. sequence