127 terms

Glossary

A B C D E F G I L M N O P R S T U V W Y Z

A

  • Abstract Base Class — A class that defines an interface by declaring abstract methods that subclasses must implement
  • Argument — A value passed to a function when it is called
  • asyncio — Python's standard library framework for asynchronous I/O using coroutines and an event loop

B

  • Boolean — An immutable type with exactly two values — True and False — used for logical operations
  • Bytecode — The intermediate low-level instructions that the Python virtual machine executes
  • Bytes — An immutable sequence of integers (0-255) representing binary data

C

  • Class — A blueprint for creating objects, defined with the class keyword
  • Closure — A function that captures and remembers variables from its enclosing scope
  • Collections Module — A standard library module providing specialised container types beyond the built-in dict, list, set, and tuple
  • Composition — A design pattern where a class contains instances of other classes rather than inheriting from them
  • Comprehension — A concise syntax for creating lists, sets, dictionaries, or generators from iterables
  • Concurrent Futures — A high-level module providing ThreadPoolExecutor and ProcessPoolExecutor for parallel task execution
  • Conditional Statement — An if/elif/else construct that executes different code blocks based on boolean conditions
  • Context Manager — An object that defines setup and teardown actions for a with statement block
  • Context Manager Protocol — The __enter__ and __exit__ dunder methods that enable the with statement
  • Coroutine — A function defined with async def that can be paused and resumed, enabling cooperative concurrency
  • Coverage — A metric and tool that measures how much of your code is executed during testing
  • CPython — The reference implementation of Python, written in C
  • Custom Exception — A user-defined exception class that inherits from Exception for domain-specific error handling

D

  • Dataclass — A decorator that auto-generates __init__, __repr__, __eq__, and other methods for data-holding classes
  • DataFrame — A two-dimensional, labelled tabular data structure in pandas with typed columns
  • Decorator — A function that wraps another function to extend its behaviour without modifying its code
  • Decorator Pattern — A structural design pattern for adding behaviour to objects dynamically, distinct from Python's @ decorator syntax
  • Decorators with Arguments — A decorator pattern that accepts configuration parameters, requiring a triple-nested function structure
  • Dictionary — A mutable mapping from hashable keys to arbitrary values
  • Dictionary Comprehension — A concise syntax for creating a dictionary by transforming key-value pairs from an iterable
  • Django — A high-level, batteries-included web framework for building full-featured web applications
  • Docstring — A string literal that documents a module, class, or function, accessible at runtime via __doc__
  • Duck Typing — A programming style where an object's suitability is determined by its methods and attributes, not its class
  • Dunder Method — A special method with double-underscore names that Python calls automatically for built-in operations
  • Dynamic Typing — A type system where types are associated with values at run time rather than with variables at compile time

E

  • EAFP — Easier to Ask Forgiveness than Permission — Python's idiomatic style of trying an operation and handling failure
  • Enumerate — A built-in function that pairs each element of an iterable with its index
  • Exception — An object representing an error or unusual condition that disrupts normal program flow
  • Exception Hierarchy — The class tree of built-in exceptions rooted at BaseException

F

  • F-string — A formatted string literal that embeds Python expressions directly inside braces
  • FastAPI — A modern, high-performance web framework for building APIs with type hints and async support
  • Fixture — A pytest function that provides reusable test dependencies and setup/teardown logic
  • Flask — A lightweight, minimalist web framework that gives you the tools without the constraints
  • Float — An immutable numeric type representing real numbers using IEEE 754 double-precision
  • For Loop — A statement that iterates over the items of any iterable object
  • Frozenset — An immutable version of set that can be used as a dictionary key or set element
  • Function — A reusable block of code defined with the def keyword that takes parameters and returns a value
  • Functools — A standard library module providing higher-order functions and operations on callable objects
  • functools.wraps — A decorator that preserves the original function's metadata when it is wrapped by a decorator

G

  • Generator — A function that yields values lazily one at a time using the yield keyword
  • Generator Expression — A compact syntax for creating a generator, like a list comprehension but with parentheses
  • Generic — A type that is parameterised by one or more type variables, enabling type-safe reusable containers and functions
  • GIL — The Global Interpreter Lock — a mutex in CPython that allows only one thread to execute Python bytecode at a time
  • Global Statement — A declaration that allows a function to assign to a variable in the module-level global scope
  • Gradual Typing — A type system that allows mixing typed and untyped code, adding type hints incrementally

I

  • Immutable — An object whose state cannot be changed after creation
  • Import — The statement that loads a module or package and makes its contents available in the current namespace
  • Indentation — Python's use of whitespace to define code blocks, replacing braces used in other languages
  • Inheritance — A mechanism where a class derives attributes and methods from a parent class
  • Instance — A specific object created from a class
  • Integer — An immutable numeric type representing whole numbers of arbitrary precision
  • Interpreter — A program that executes code line by line without a separate compilation step
  • Iterable — Any object that can return an iterator, enabling use in for loops and comprehensions
  • Iterator — An object that produces the next value in a sequence when you call next() on it
  • Itertools — A standard library module providing fast, memory-efficient iterator building blocks

L

  • Lambda — An anonymous, single-expression function defined inline with the lambda keyword
  • LBYL — Look Before You Leap — checking preconditions before attempting an operation
  • LEGB Rule — Python's name resolution order — Local, Enclosing, Global, Built-in
  • List — An ordered, mutable sequence of arbitrary objects
  • List Comprehension — A concise syntax for creating a new list by transforming and filtering an iterable
  • List Method — Built-in methods on list objects for adding, removing, sorting, and manipulating elements
  • Logging — The standard library module for recording diagnostic messages with configurable severity levels

M

  • Match Statement — A structural pattern matching construct introduced in Python 3.10 for matching against complex data
  • matplotlib — The foundational Python library for creating static, animated, and interactive visualisations
  • Method — A function defined inside a class that operates on instances of that class
  • Method Resolution Order — The order in which Python searches base classes when looking up a method in a multiple-inheritance hierarchy
  • Mixin — A small class that provides specific functionality meant to be combined with other classes via multiple inheritance
  • Mock — A test object that simulates the behaviour of real objects, allowing isolated unit testing
  • Module — A Python file that can be imported to reuse its functions, classes, and variables
  • Mutable — An object whose state can be changed after creation
  • mypy — The reference static type checker for Python that analyses type hints without running the code

N

  • Named Tuple — A tuple subclass with named fields, providing readable lightweight data structures
  • Namespace — A mapping from names to objects that prevents naming conflicts between different parts of a program
  • ndarray — NumPy's core data structure — a fixed-size, homogeneous, multi-dimensional array
  • None — Python's singleton object representing the absence of a value
  • Nonlocal Statement — A declaration that allows a nested function to assign to a variable in its enclosing function's scope
  • NumPy — The foundational Python library for numerical computing with efficient multi-dimensional arrays

O

  • Object — An entity with identity, type, and value — the fundamental building block of Python

P

  • Package — A directory containing modules and an __init__.py file, providing hierarchical namespace organisation
  • pandas — The dominant Python library for tabular data analysis and manipulation
  • Parameter — A name in a function definition that receives a value when the function is called
  • pathlib — An object-oriented module for filesystem path manipulation, replacing os.path
  • PEP — A Python Enhancement Proposal — the formal process for proposing changes to the Python language
  • pip — Python's standard package installer that downloads and installs packages from PyPI
  • Pip Freeze — A pip command that outputs all installed packages and their versions in requirements.txt format
  • Process — An independent instance of a program with its own memory space, enabling true parallel execution
  • Property — A managed attribute that uses getter and setter methods while appearing as a simple attribute
  • Protocol — A typing construct that defines structural subtyping — an interface satisfied by any class with matching methods
  • PSF — The Python Software Foundation — the non-profit organisation that stewards the Python language
  • Pydantic — A data validation library that uses type hints to define data models with automatic parsing and validation
  • PyPI — The Python Package Index — the official repository of third-party Python packages
  • pyproject.toml — The modern standard configuration file for Python projects, replacing setup.py and setup.cfg
  • pytest — The most popular Python testing framework, known for simple assertions and powerful fixtures
  • Python — A high-level, general-purpose programming language emphasising readability and simplicity

R

  • Range — An immutable sequence of integers generated lazily, commonly used in for loops
  • Regular Expression — A pattern language for matching, searching, and manipulating text
  • REPL — The interactive Read-Eval-Print Loop for executing Python expressions one at a time
  • Return Value — The object a function sends back to its caller via the return statement

S

  • Scope — The region of a program where a variable name is accessible
  • Self — The conventional name for the first parameter of an instance method, referring to the current instance
  • Series — A one-dimensional labelled array in pandas, the building block of a DataFrame
  • Set — An unordered, mutable collection of unique hashable elements
  • Set Comprehension — A concise syntax for creating a set by transforming elements from an iterable
  • Slice — A syntax for extracting a sub-sequence from a list, tuple, string, or other sequence using start:stop:step
  • String — An immutable sequence of Unicode characters used for text
  • String Method — Built-in methods on str objects for searching, transforming, splitting, and joining text
  • Subprocess — A standard library module for spawning and interacting with external processes

T

  • Thread — A lightweight unit of execution that shares memory with other threads in the same process
  • Truthiness — The property of any Python object being evaluable as True or False in a boolean context
  • Try/Except — A statement block for catching and handling exceptions
  • Tuple — An ordered, immutable sequence of arbitrary objects
  • Type Alias — A named shorthand for a complex type annotation, improving readability
  • Type Hint — An annotation that specifies the expected type of a variable, parameter, or return value

U

  • Unpacking — A syntax for assigning elements of an iterable to multiple variables simultaneously

V

  • Variable — A name that refers to an object in memory
  • Virtual Environment — An isolated Python installation that keeps project dependencies separate from the system Python

W

  • Walrus Operator — The := operator that assigns a value to a variable as part of an expression
  • While Loop — A statement that repeats a block of code as long as a condition remains true

Y

  • Yield — A keyword that produces a value from a generator and suspends its execution

Z

  • Zen of Python — A collection of 19 aphorisms guiding Python's design philosophy, accessed via import this
  • Zip — A built-in function that pairs corresponding elements from multiple iterables

This site is currently in Beta. Please email Chris Paton (cpaton@gmail.com) with any suggestions, questions or comments.