Last active
December 17, 2015 10:58
-
-
Save rbpasker/5598612 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 mybase: | |
derived_from = None | |
def set_derived_from(self, derived): | |
this.derived_from = derived | |
def derived(fn): | |
def wrapped(self, other): | |
att = fn(self, other) | |
if (att is not None) and (self.derived_From is not None): | |
att.derived_from = self.derived_from | |
return wrapped | |
class my(mybase): | |
@derived | |
def tag(self, d): | |
return self.md.add_name(data=d, info=Metadata.INFO['TAG']) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
otherwise I have to do this: