Created
September 13, 2021 14:18
-
-
Save Arcensoth/b85099fa2f668f27d1736cf342a5f0fc to your computer and use it in GitHub Desktop.
Revisions
-
Arcensoth created this gist
Sep 13, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ 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