Created
May 23, 2020 20:19
-
-
Save lostmsu/f9370029a389fd54493a1b1631917e77 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 List: | |
def add(self, item): ... | |
class ListMixin: | |
def append(self, item): return self.add(item) | |
def mix_in(target_type, mixin): | |
??? | |
mix_in(List, ListMixin) | |
l = List() | |
l.append(42) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment