Created
October 28, 2016 20:06
-
-
Save ehermes/a71ef465f0a0dd8c8ed4557166757517 to your computer and use it in GitHub Desktop.
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 characters
| #!/usr/bin/env python | |
| class Foo(object): | |
| def __new__(cls): | |
| new_foo = super(Foo, cls).__new__(cls) | |
| new_foo.x = None | |
| new_foo.y = None | |
| new_foo.z = None | |
| return new_foo | |
| class Bar(Foo): | |
| def __init__(self, x): | |
| self.x = x | |
| class Baz(Foo): | |
| def __init__(self, y): | |
| self.y = y | |
| my_bar = Bar(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment