- Glossary - P
- ********
- package
- A Python *module* which can contain submodules or recursively,
- subpackages. Technically, a package is a Python module with an
- "__path__" attribute.
- See also *regular package* and *namespace package*.
- parameter
- A named entity in a *function* (or method) definition that
- specifies an *argument* (or in some cases, arguments) that the
- function can accept. There are five kinds of parameter:
- * *positional-or-keyword*: specifies an argument that can be passed
- either *positionally* or as a *keyword argument*. This is the
- default kind of parameter, for example *foo* and *bar* in the
- following:
- def func(foo, bar=None): ...
- * *positional-only*: specifies an argument that can be supplied
- only by position. Positional-only parameters can be defined by
- including a "/" character in the parameter list of the function
- definition after them, for example *posonly1* and *posonly2* in
- the following:
- def func(posonly1, posonly2, /, positional_or_keyword): ...
- * *keyword-only*: specifies an argument that can be supplied only
- by keyword. Keyword-only parameters can be defined by including
- a single var-positional parameter or bare "*" in the parameter
- list of the function definition before them, for example
- *kw_only1* and *kw_only2* in the following:
- def func(arg, *, kw_only1, kw_only2): ...
- * *var-positional*: specifies that an arbitrary sequence of
- positional arguments can be provided (in addition to any
- positional arguments already accepted by other parameters). Such
- a parameter can be defined by prepending the parameter name with
- "*", for example *args* in the following:
- def func(*args, **kwargs): ...
- * *var-keyword*: specifies that arbitrarily many keyword arguments
- can be provided (in addition to any keyword arguments already
- accepted by other parameters). Such a parameter can be defined
- by prepending the parameter name with "**", for example *kwargs*
- in the example above.
- Parameters can specify both optional and required arguments, as
- well as default values for some optional arguments.
- See also the *argument* glossary entry, the FAQ question on the
- difference between arguments and parameters, the
- "inspect.Parameter" class, the Function definitions section, and
- **PEP 362**.
- path entry
- A single location on the *import path* which the *path based
- finder* consults to find modules for importing.
- path entry finder
- A *finder* returned by a callable on "sys.path_hooks" (i.e. a *path
- entry hook*) which knows how to locate modules given a *path
- entry*.
- See "importlib.abc.PathEntryFinder" for the methods that path entry
- finders implement.
- path entry hook
- A callable on the "sys.path_hook" list which returns a *path entry
- finder* if it knows how to find modules on a specific *path entry*.
- path based finder
- One of the default *meta path finders* which searches an *import
- path* for modules.
- path-like object
- An object representing a file system path. A path-like object is
- either a "str" or "bytes" object representing a path, or an object
- implementing the "os.PathLike" protocol. An object that supports
- the "os.PathLike" protocol can be converted to a "str" or "bytes"
- file system path by calling the "os.fspath()" function;
- "os.fsdecode()" and "os.fsencode()" can be used to guarantee a
- "str" or "bytes" result instead, respectively. Introduced by **PEP
- 519**.
- PEP
- Python Enhancement Proposal. A PEP is a design document providing
- information to the Python community, or describing a new feature
- for Python or its processes or environment. PEPs should provide a
- concise technical specification and a rationale for proposed
- features.
- PEPs are intended to be the primary mechanisms for proposing major
- new features, for collecting community input on an issue, and for
- documenting the design decisions that have gone into Python. The
- PEP author is responsible for building consensus within the
- community and documenting dissenting opinions.
- See **PEP 1**.
- portion
- A set of files in a single directory (possibly stored in a zip
- file) that contribute to a namespace package, as defined in **PEP
- 420**.
- positional argument
- See *argument*.
- provisional API
- A provisional API is one which has been deliberately excluded from
- the standard library's backwards compatibility guarantees. While
- major changes to such interfaces are not expected, as long as they
- are marked provisional, backwards incompatible changes (up to and
- including removal of the interface) may occur if deemed necessary
- by core developers. Such changes will not be made gratuitously --
- they will occur only if serious fundamental flaws are uncovered
- that were missed prior to the inclusion of the API.
- Even for provisional APIs, backwards incompatible changes are seen
- as a "solution of last resort" - every attempt will still be made
- to find a backwards compatible resolution to any identified
- problems.
- This process allows the standard library to continue to evolve over
- time, without locking in problematic design errors for extended
- periods of time. See **PEP 411** for more details.
- provisional package
- See *provisional API*.
- Python 3000
- Nickname for the Python 3.x release line (coined long ago when the
- release of version 3 was something in the distant future.) This is
- also abbreviated "Py3k".
- Pythonic
- An idea or piece of code which closely follows the most common
- idioms of the Python language, rather than implementing code using
- concepts common to other languages. For example, a common idiom in
- Python is to loop over all elements of an iterable using a "for"
- statement. Many other languages don't have this type of construct,
- so people unfamiliar with Python sometimes use a numerical counter
- instead:
- for i in range(len(food)):
- print(food[i])
- As opposed to the cleaner, Pythonic method:
- for piece in food:
- print(piece)
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