Created
September 13, 2021 14:18
-
-
Save Arcensoth/b85099fa2f668f27d1736cf342a5f0fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, abstractmethod | |
class AbstractThing(ABC): | |
@classmethod | |
@abstractmethod | |
def classy(cls): | |
... | |
@classmethod | |
@property | |
@abstractmethod | |
def class_proppy(cls): | |
... | |
@abstractmethod | |
def selfy(self): | |
... | |
@property | |
@abstractmethod | |
def self_proppy(self): | |
... | |
class ConcreteThing(AbstractThing): | |
@classmethod | |
def classy(cls): | |
print("classy") | |
@classmethod | |
@property | |
def class_proppy(cls): | |
print("class_proppy") | |
def selfy(self): | |
print("selfy") | |
@property | |
def self_proppy(self): | |
print("proppy") | |
c = ConcreteThing() | |
c.classy() | |
c.class_proppy | |
c.selfy() | |
c.self_proppy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment