class
class inherit from object
class MyClass(object):
# class code follows...class ClassicSpam:
pass
class NewSpam(object):
passABC, Abstract Base Classes
try:
someobj[1]
except TypeError:
# when object is not subscriptableDefine it
Create ABC
Metaclass
standard case:
metaclass case:
abstractmethod = class with interface
Last updated