Demystifying the Magic
Learn about the abstract base classes, metaclasses, and Python's type class for class construction, extension, and binding operators.
We'll cover the following...
We’ve covered various concepts in the previous lesson to grasp how we can create our own base classes. It’s clear they’re doing a lot of work for us. Let’s look inside the class to see some of what’s going on:
Python 3.10.4
Files
from Dice import Dieprint(Die.__abstractmethods__)print(Die.roll.__isabstractmethod__)
In the Dice.py file, the abstract method, roll(), ...
Ask