Skip to content

Glossary

  • abc.ABC: A base class for defining abstract behavior.
  • bool: The Python type for True or False.
  • closure: A function that remembers values from the surrounding scope.
  • comprehension: A compact way to build a list, set, or dict.
  • concrete type: A specific known type such as int or Student.
  • dataclass: A class decorator for simple data-holding classes.
  • duck typing: The idea that an object is usable if it behaves correctly.
  • generator: A lazy iterable that produces values on demand.
  • higher-order function: A function that takes or returns a function.
  • inference: The process of working out a type from code and usage.
  • iterator: An object that produces values one at a time.
  • lambda: A small anonymous function.
  • polymorphism: One piece of code working with many types.
  • protocol: A description of shared behavior, often using typing.Protocol.
  • recursion: A function solving a problem by calling itself.
  • type hint: Optional syntax that describes expected types.
  • type safety: Avoiding invalid operations on the wrong kind of value.
  • user-defined type: A type created by the programmer with class, Enum, or dataclass.

Built from Markdown with VitePress.