Created
August 10, 2018 16:24
-
-
Save yyolk/c6b8311a5c0172687928311ebe6c0261 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
class Base(): | |
def __init__(self, *a, **k): | |
exec( "self.{} = self._op".format( | |
kw.get('override_fn_name', | |
self.__class__.__name__.lower()))) | |
def _op(self, *a, **k): | |
pass | |
class Extend(Base): | |
pass | |
c = Extend() | |
print(c.__dict__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment