Created
March 3, 2019 11:49
-
-
Save NMZivkovic/ecf8bbc0bb7a16b736c8c959e8f7fa2e 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
from rick import Rick | |
class Citadel(object): | |
def __init__(self): | |
self.__residents__ = [] | |
def get_all_residents(self): | |
return self.__residents__ | |
def add_resident(self, resident): | |
self.__residents__.append(resident) | |
def picle_ricks_with_morties(self): | |
for resident in self.__residents__: | |
if isinstance(resident, Rick): | |
if resident.morty: resident.is_pickle = True | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment