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 F
By Guest on 13th November 2022 07:58:59 AM | Syntax: PYTHON | Views: 151



New Paste New paste | Download Paste Download | Toggle Line Numbers Show/Hide line no. | Copy Paste Copy text to clipboard
  1. Glossary - F
  2. ********
  3.  
  4. f-string
  5.    String literals prefixed with "'f'" or "'F'" are commonly called
  6.    "f-strings" which is short for formatted string literals.  See also
  7.    **PEP 498**.
  8.  
  9. file object
  10.    An object exposing a file-oriented API (with methods such as
  11.    "read()" or "write()") to an underlying resource.  Depending on the
  12.    way it was created, a file object can mediate access to a real on-
  13.    disk file or to another type of storage or communication device
  14.    (for example standard input/output, in-memory buffers, sockets,
  15.    pipes, etc.).  File objects are also called *file-like objects* or
  16.    *streams*.
  17.  
  18.    There are actually three categories of file objects: raw *binary
  19.    files*, buffered *binary files* and *text files*. Their interfaces
  20.    are defined in the "io" module.  The canonical way to create a file
  21.    object is by using the "open()" function.
  22.  
  23. file-like object
  24.    A synonym for *file object*.
  25.  
  26. filesystem encoding and error handler
  27.    Encoding and error handler used by Python to decode bytes from the
  28.    operating system and encode Unicode to the operating system.
  29.  
  30.    The filesystem encoding must guarantee to successfully decode all
  31.    bytes below 128. If the file system encoding fails to provide this
  32.    guarantee, API functions can raise "UnicodeError".
  33.  
  34.    The "sys.getfilesystemencoding()" and
  35.    "sys.getfilesystemencodeerrors()" functions can be used to get the
  36.    filesystem encoding and error handler.
  37.  
  38.    The *filesystem encoding and error handler* are configured at
  39.    Python startup by the "PyConfig_Read()" function: see
  40.    "filesystem_encoding" and "filesystem_errors" members of
  41.    "PyConfig".
  42.  
  43.    See also the *locale encoding*.
  44.  
  45. finder
  46.    An object that tries to find the *loader* for a module that is
  47.    being imported.
  48.  
  49.    Since Python 3.3, there are two types of finder: *meta path
  50.    finders* for use with "sys.meta_path", and *path entry finders* for
  51.    use with "sys.path_hooks".
  52.  
  53.    See **PEP 302**, **PEP 420** and **PEP 451** for much more detail.
  54.  
  55. floor division
  56.    Mathematical division that rounds down to nearest integer.  The
  57.    floor division operator is "//".  For example, the expression "11
  58.   // 4" evaluates to "2" in contrast to the "2.75" returned by float
  59.    true division.  Note that "(-11) // 4" is "-3" because that is
  60.    "-2.75" rounded *downward*. See **PEP 238**.
  61.  
  62. function
  63.    A series of statements which returns some value to a caller. It can
  64.    also be passed zero or more *arguments* which may be used in the
  65.    execution of the body. See also *parameter*, *method*, and the
  66.    Function definitions section.
  67.  
  68. function annotation
  69.    An *annotation* of a function parameter or return value.
  70.  
  71.    Function annotations are usually used for *type hints*: for
  72.    example, this function is expected to take two "int" arguments and
  73.    is also expected to have an "int" return value:
  74.  
  75.       def sum_two_numbers(a: int, b: int) -> int:
  76.          return a + b
  77.  
  78.    Function annotation syntax is explained in section Function
  79.    definitions.
  80.  
  81.    See *variable annotation* and **PEP 484**, which describe this
  82.    functionality. Also see Annotations Best Practices for best
  83.    practices on working with annotations.
  84.  
  85. __future__
  86.    A future statement, "from __future__ import <feature>", directs the
  87.    compiler to compile the current module using syntax or semantics
  88.    that will become standard in a future release of Python. The
  89.    "__future__" module documents the possible values of *feature*.  By
  90.    importing this module and evaluating its variables, you can see
  91.    when a new feature was first added to the language and when it will
  92.    (or did) become the default:
  93.  
  94.       >>> import __future__
  95.       >>> __future__.division
  96.       _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
  • Recent Pastes