1/10
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Data Abstraction
Used to hide the internal functionality of the function from the users
Abstract Class
A class that consists of one or more abstract methods. Blueprint of other classes
Abstract Base Classes (ABC)
Works by decorating methods of the base class as abstract. Registers concrete classes as the implementation of the abstract base
@abstractmethod decorator
To define an abstract method or if we don't provide the definition to the method, it automatically becomes the abstract method.
@property decorator
Used to give special functionality to a method.
Encapsulation
Wrapping data and its methods in one unit. Can prevent accidental modification of data by putting access restrictions on variables and methods.
Public
Variables or methods can be accessed both inside and outside the class.
Protected
Variables or methods can be accessed only within the class and its subclasses. Denoted by a single underscore prefix
Private
Variables or methods can be accessed only within the class. Denoted by a double underscore prefix.
math Module
Built-in module for mathematical tasks. Has a set of methods and constants
datetime Module
Used to work with dates as date objects. Date contains year, month, day, hour, minute, second, and microsecond