Created
August 10, 2012 09:28
-
-
Save erikbgithub/3312908 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
#anstelle von | |
def was_anderes(self): | |
if not hasattr(self,'variable'): | |
self.variable = new_variable() | |
#glaube ich, dass folgendes besser wäre: | |
def __init__(self): | |
self.variable = None | |
[...] | |
def was_anderes(self): | |
if not self.variable: | |
self.variable = new_variable() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment