Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.