glossary.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .. _glossary:
  2. ********
  3. Glossary
  4. ********
  5. .. glossary::
  6. bytecode
  7. Python source code is compiled into bytecode, the internal representation
  8. of a Python program in the interpreter. The bytecode is also cached in
  9. ``.pyc`` and ``.pyo`` files so that executing the same file is faster the
  10. second time (recompilation from source to bytecode can be avoided). This
  11. "intermediate language" is said to run on a :term:`virtual machine`
  12. that executes the machine code corresponding to each bytecode.
  13. CPython
  14. The canonical implementation of the Python programming language. The
  15. term "CPython" is used in contexts when necessary to distinguish this
  16. implementation from others such as Jython or IronPython.
  17. GIL
  18. See :term:`global interpreter lock`.
  19. global interpreter lock
  20. The lock used by Python threads to assure that only one thread
  21. executes in the :term:`CPython` :term:`virtual machine` at a time.
  22. This simplifies the CPython implementation by assuring that no two
  23. processes can access the same memory at the same time. Locking the
  24. entire interpreter makes it easier for the interpreter to be
  25. multi-threaded, at the expense of much of the parallelism afforded by
  26. multi-processor machines. Efforts have been made in the past to
  27. create a "free-threaded" interpreter (one which locks shared data at a
  28. much finer granularity), but so far none have been successful because
  29. performance suffered in the common single-processor case.
  30. virtual machine
  31. A computer defined entirely in software. Python's virtual machine
  32. executes the :term:`bytecode` emitted by the bytecode compiler.