Python Glossary
Welcome to the Python glossary, a comprehensive reference for common Python programming concepts and terminology. This guide serves both newcomers and experienced developers seeking quick references or refreshers on Python’s features.
- annotation A way to attach metadata to function arguments and return values.
- argument A value or object that you pass into a function or method when you call it.
- BDFL Benevolent Dictator For Life, a.k.a. Guido van Rossum, Python’s creator.
- binary file A type of computer file that stores data in binary format.
- Boolean A fundamental data type that can have only one of two values: true or false.
- buffer protocol A mechanism in Python that allows objects to share their internal memory buffers with other objects for direct access.
- bytecode A low-level set of instructions that is portable across different platforms, which means it can be executed on any machine that has a compatible CPython interpreter.
- callable An object that you can call like a function.
- code style Guidelines for writing code in a clear, standardized way that makes it easy to read, understand, and maintain
- comment Explanatory text that Python ignores when executing code.
- console The text-based interface used for interacting with your computer’s operating system and running Python programs.
- context manager An object that allows you to handle a context where you allocate and release resources when needed.
- CPython The reference and official implementation of the Python programming language.
- docstring A string literal that occurs as the first statement in a module, function, class, or method definition and works as documentation.
- duck typing A type system where an object is considered compatible with a given type if it has all the methods and attributes that the type requires.
- EAFP A coding style that assumes the presence of valid attributes and methods, and handle exceptions if they aren’t present.
- exception An event that interrupts normal program flow in Python, often due to errors or special conditions.
- expression A combination of values, variables, operators, and function calls that can be evaluated to produce a value.
- f-string A string literal that allows you to interpolate expressions inside strings using curly braces {}, to produce a formatted string.
- function A self-contained block of code that performs a specific task.
- functional programming A programming paradigm that emphasizes pure functions, immutable data, and function composition.
- function annotation A way to attach type information or type hints to function arguments and return values.
- garbage collection An automatic memory management feature that reclaims memory occupied by objects that are no longer in use by your program.
- Global Interpreter Lock (GIL) A lock used in the CPython implementation to ensure that only one thread executes Python bytecode at a time.
- hashable An object with a hash value that remains constant during the object’s lifetime.
- IDLE A lightweight integrated development environment (IDE) that comes bundled with Python.
- immutable An object whose value can’t be modified after it’s created.
- interpreter The program that reads and executes Python code.
- iterable An object that can return its elements one at a time, allowing you to loop over it using a for loop or any other iteration tool.
- iterator An object that adheres to the iterator protocol and allows you to iterate through all the elements in a data stream.
- LBYL A coding style that emphasizes checking for conditions before executing a particular action.
- linter A static code analysis tool that examines source code to flag potential errors, bugs, stylistic issues, and suspicious constructs.
- loop A programming construct that allows you to repeat a block of code multiple times.
- magic method A method that allows you to define how objects behave with built-in functions and operators.
- metaprogramming The practice of writing code that manipulates or generates other code.
- module A file containing Python code, which can define functions, classes, variables, and more.
- mutable An object that allows you to modify its value in place without creating a new object.
- namespace A container that holds a collection of identifiers, such as variable and function names, and their corresponding objects.
- namespace package A type of package that allows you to split a single package across multiple directories.
- package A directory hierarchy that allows you to organize related modules and subpackages.
- parameter A variable that you use in a function or method definition to accept input values.
- PEP 8 Python’s official style guide outlining coding conventions for writing clear, readable code that’s consistent with the core Python codebase.
- pip Python’s default package installer and dependency manager.
- protocol A set of methods and attributes that a class must implement to support specific behavior or functionality.
- PyCon Python programming conferences organized by local communities worldwide.
- Python Enhancement Proposal (PEP) A design document that provides information to the Python community or proposes changes to Python itself.
- Pythonic An approach or style of writing code that aligns with Python’s philosophy and idioms.
- python.org The official website for the Python programming language.
- Python Package Index (PyPI) The official third-party software repository for the Python programming language.
- Python Software Foundation (PSF) A non-profit organization dedicated to advancing and promoting the Python programming language.
- Python Steering Council A small group elected to oversee the development and direction of the Python programming language.
- reference count A mechanism used by the interpreter to manage memory allocation and deallocation for objects.
- REPL An interactive programming environment that allows you to write and execute code in a step-by-step manner and get immediate feedback on how the code works.
- scope Defines where in a program a name (like a variable or function) can be accessed.
- source code Human-readable instructions that programmers write to create software.
- standard library A comprehensive collection of pre-written modules and functions that comes bundled with every Python installation.
- statement A logical instruction that the interpreter can execute.
- static type checker A tool that analyzes your code without executing it to ensure that the types of variables and expressions are consistent with their annotations or type hints.
- text encoding The conversion of text data into a specific format that computers can store and manipulate.
- text file A type of computer file that contains plain text.
- traceback Python’s report showing the function call stack when an exception or error is raised.
- triple-quoted string A string literal enclosed in a pair of triple quotes, either single (''') or double (""").
- type The classification of a value or object, which determes the kinds of operations that can be performed on it and the ways it can interact with other objects.
- universal newlines A way to handle files with different newline conventions across different platforms.
- variable annotation A syntax for attaching type hints to variables.
- virtual environment A directory containing all the files and executables needed to support a functional Python environment.
- virtual machine (VM) The component of the Python interpreter that executes your Python code.
- wheel Pre-built, ready-to-install distribution format for faster and more reliable Python package installation.
- Zen of Python A collection of guiding principles for writing Python code.