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 B
By Guest on 13th November 2022 01:11:30 AM | Syntax: PYTHON | Views: 146



New Paste New paste | Download Paste Download | Toggle Line Numbers Show/Hide line no. | Copy Paste Copy text to clipboard
  1. Glossary - B
  2. ********
  3.  
  4. BDFL
  5.    Benevolent Dictator For Life, a.k.a. Guido van Rossum, Python's
  6.   creator.
  7.  
  8. binary file
  9.   A *file object* able to read and write *bytes-like objects*.
  10.   Examples of binary files are files opened in binary mode ("'rb'",
  11.   "'wb'" or "'rb+'"), "sys.stdin.buffer", "sys.stdout.buffer", and
  12.   instances of "io.BytesIO" and "gzip.GzipFile".
  13.  
  14.   See also *text file* for a file object able to read and write "str"
  15.   objects.
  16.  
  17. borrowed reference
  18.   In Python's C API, a borrowed reference is a reference to an
  19.    object. It does not modify the object reference count. It becomes a
  20.    dangling pointer if the object is destroyed. For example, a garbage
  21.    collection can remove the last *strong reference* to the object and
  22.    so destroy it.
  23.  
  24.    Calling "Py_INCREF()" on the *borrowed reference* is recommended to
  25.    convert it to a *strong reference* in-place, except when the object
  26.    cannot be destroyed before the last usage of the borrowed
  27.    reference. The "Py_NewRef()" function can be used to create a new
  28.    *strong reference*.
  29.  
  30. bytes-like object
  31.    An object that supports the Buffer Protocol and can export a
  32.    C-*contiguous* buffer. This includes all "bytes", "bytearray", and
  33.    "array.array" objects, as well as many common "memoryview" objects.
  34.    Bytes-like objects can be used for various operations that work
  35.    with binary data; these include compression, saving to a binary
  36.    file, and sending over a socket.
  37.  
  38.    Some operations need the binary data to be mutable.  The
  39.    documentation often refers to these as "read-write bytes-like
  40.   objects".  Example mutable buffer objects include "bytearray" and a
  41.    "memoryview" of a "bytearray". Other operations require the binary
  42.    data to be stored in immutable objects ("read-only bytes-like
  43.   objects"); examples of these include "bytes" and a "memoryview" of
  44.    a "bytes" object.
  45.  
  46. bytecode
  47.    Python source code is compiled into bytecode, the internal
  48.    representation of a Python program in the CPython interpreter.  The
  49.    bytecode is also cached in ".pyc" files so that executing the same
  50.    file is faster the second time (recompilation from source to
  51.    bytecode can be avoided).  This "intermediate language" is said to
  52.    run on a *virtual machine* that executes the machine code
  53.    corresponding to each bytecode. Do note that bytecodes are not
  54.    expected to work between different Python virtual machines, nor to
  55.    be stable between Python releases.
  56.  
  57.    A list of bytecode instructions can be found in the documentation
  58.    for the dis module.
















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