Skip to content

Instantly share code, notes, and snippets.

@sloria sloria/
Last active Aug 13, 2019

What would you like to do?
# Better
class Person:
def __init__(self, name, occupation): = name
self.occupation = occupation
self._relatives = None
def relatives(self):
if self._relatives is None:
self._relatives = ... # Get all relatives
return self._relatives
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.