-
Notifications
You must be signed in to change notification settings - Fork 6
Family class API
39xdgy edited this page Sep 25, 2020
·
4 revisions
- id: str
- _name: str
- _gender: str
- _birthDate: tuple
- _deathDate: tuple
- _familyList: list
- _parentFamily: Family
init(self, id: str, husband = None, wife = None, married: str = None, divorced: str = None, children_list: list = []):
This is the class for Family.
id is the only variable that is required. If other variable does not exist, it would return None
type of husband and wife would be in Individual
type of each element in children_list is Individual
If children does not exist, it would return an empty list
all date value are passed in as str, and saved as tuple with formate (year, month, day)
all get and set would not display here.
This function would add one kid into the children list
this function Would take the string input and covert into a int tuple:(year, month, day)