Glossary
class: A user-defined type. A class definition creates a new class object.
class object: An object that contains information about a user-defined type. The class object can be used to create instances of the type.
indexable class: an indexable class provides a familiar and intuitive interface for accessing elements within its instances using square brackets notation.
iterable class: an iterable class allows traversal of its elements in a systematic way via dunder methods, providing a natural integration with Python's iteration protocols.
comparable class: a comparable class provides a meaningful order among its instances.
instance: An object that belongs to a class.
attribute: One of the named values associated with an object.
embedded (object): An object that is stored as an attribute of another object.
shallow copy: To copy the contents of an object, including any references to embedded objects; implemented by the copy
function in the copy
module.
deep copy: To copy the contents of an object as well as any embedded objects, and any objects embedded in them, and so on; implemented by the deepcopy
function in the copy
module.
object diagram: A diagram that shows objects, their attributes, and the values of the attributes.
prototype and patch: A development plan that involves writing a rough draft of a program, testing, and correcting errors as they are found.
planned development: A development plan that involves high-level insight into the problem and more planning than incremental development or prototype development.
pure function: A function that does not modify any of the objects it receives as arguments. Most pure functions are fruitful.
modifier: A function that changes one or more of the objects it receives as arguments. Most modifiers are fruitless.
invariant: A condition that should always be true during the execution of a program.
object-oriented language: A language that provides features, such as user-defined classes and method syntax, that facilitate object-oriented programming.
object-oriented programming: A style of programming in which data and the operations that manipulate it are organized into classes and methods.
method: A function that is defined inside a class definition and is invoked on instances of that class.
dunder method: special methods in Python identified by their names enclosed in double underscores at the beginning and end. Used for operator overloading and interacting with built-in function.
subject: The object a method is invoked on.
operator overloading: Changing the behaviour of an operator like +
so it works with a user-defined type.
type-based dispatch: A programming pattern that checks the type of an operand and invokes different functions for different types.
polymorphic: Pertaining to a function that can work with more than one type.
Last updated