- Glossary - F
- ********
- f-string
- String literals prefixed with "'f'" or "'F'" are commonly called
- "f-strings" which is short for formatted string literals. See also
- **PEP 498**.
- file object
- An object exposing a file-oriented API (with methods such as
- "read()" or "write()") to an underlying resource. Depending on the
- way it was created, a file object can mediate access to a real on-
- disk file or to another type of storage or communication device
- (for example standard input/output, in-memory buffers, sockets,
- pipes, etc.). File objects are also called *file-like objects* or
- *streams*.
- There are actually three categories of file objects: raw *binary
- files*, buffered *binary files* and *text files*. Their interfaces
- are defined in the "io" module. The canonical way to create a file
- object is by using the "open()" function.
- file-like object
- A synonym for *file object*.
- filesystem encoding and error handler
- Encoding and error handler used by Python to decode bytes from the
- operating system and encode Unicode to the operating system.
- The filesystem encoding must guarantee to successfully decode all
- bytes below 128. If the file system encoding fails to provide this
- guarantee, API functions can raise "UnicodeError".
- The "sys.getfilesystemencoding()" and
- "sys.getfilesystemencodeerrors()" functions can be used to get the
- filesystem encoding and error handler.
- The *filesystem encoding and error handler* are configured at
- Python startup by the "PyConfig_Read()" function: see
- "filesystem_encoding" and "filesystem_errors" members of
- "PyConfig".
- See also the *locale encoding*.
- finder
- An object that tries to find the *loader* for a module that is
- being imported.
- Since Python 3.3, there are two types of finder: *meta path
- finders* for use with "sys.meta_path", and *path entry finders* for
- use with "sys.path_hooks".
- See **PEP 302**, **PEP 420** and **PEP 451** for much more detail.
- floor division
- Mathematical division that rounds down to nearest integer. The
- floor division operator is "//". For example, the expression "11
- // 4" evaluates to "2" in contrast to the "2.75" returned by float
- true division. Note that "(-11) // 4" is "-3" because that is
- "-2.75" rounded *downward*. See **PEP 238**.
- function
- A series of statements which returns some value to a caller. It can
- also be passed zero or more *arguments* which may be used in the
- execution of the body. See also *parameter*, *method*, and the
- Function definitions section.
- function annotation
- An *annotation* of a function parameter or return value.
- Function annotations are usually used for *type hints*: for
- example, this function is expected to take two "int" arguments and
- is also expected to have an "int" return value:
- def sum_two_numbers(a: int, b: int) -> int:
- return a + b
- Function annotation syntax is explained in section Function
- definitions.
- See *variable annotation* and **PEP 484**, which describe this
- functionality. Also see Annotations Best Practices for best
- practices on working with annotations.
- __future__
- A future statement, "from __future__ import <feature>", directs the
- compiler to compile the current module using syntax or semantics
- that will become standard in a future release of Python. The
- "__future__" module documents the possible values of *feature*. By
- importing this module and evaluating its variables, you can see
- when a new feature was first added to the language and when it will
- (or did) become the default:
- >>> import __future__
- >>> __future__.division
- _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
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