Python Classes and Recursion Flashcards
object
In programming, an object is a grouping of data (variables) and operations that can be performed on that data (functions or methods).
encapsulation
aka Abstraction / information hiding
when a user interacts with an object at a high level, allowing lower-level internal details to remain hidden (aka information hiding or encapsulation).
abstract data type / ADT
An abstract data type (ADT) is a data type whose creation and update are constrained to specific well-defined operations.
built-in
objects that Python automatically creates for a programmer to use and include the basic data types like integers and strings.
class
used to create a user-defined type of object containing groups of related variables and functions.
attributes
determines the data and behavior of the class for objects.
instantiation
Defining a new class variable by ‘calling’ the class, using parentheses like a function call as in my_time = Time().
instance
an individual object of the given class.
method
A method is a function defined within a class.
constructor
__init__
responsible for setting up the initial state of the new instance.
attribute reference operator /
member operator /
dot notation
Attributes can be accessed using the attribute reference operator ‘.’ (sometimes called the member operator or dot notation).
instance method
A function defined within a class is known as an instance method.
special method name
A special method name, indicating that the method implements some special behavior of the class, identified with the double underscore
__init__ - initializer/constructor
class object
A class object acts as a factory that creates instance objects.
instance object
When created by the class object, an instance object is initialized via the __init__ method.