Class Reference¶
Classes for everything
Todo
Add __str__
and __repr__
methods for each class (#1)
-
class
everything.
Company
(name: str)[source]¶ A company/business
New in version 0.1.0.
Parameters: name (str) – The company’s name
-
class
everything.
Occupation
(title: str, company: Union[everything.Company, str, None] = None, *, department: Optional[str] = None)[source]¶ An occupation
New in version 0.1.0.
Parameters: - title (str) – The job title
- company (
Company
or str, optional) – The company
Note
If
company
is not given as aCompany
object, it will be converted to one.Keyword Arguments: department (str, optional) – The department
-
class
everything.
Person
(name: str, *, birthday: Optional[datetime.date] = None, occupation: Optional[everything.Occupation] = None)[source]¶ A person
New in version 0.1.0.
Parameters: name (str) – The person’s name
Keyword Arguments: - birthday (datetime.date, optional) – The person’s date of birth
- occupation (
Occupation
, optional) – The person’s occupation
-
department
¶ The person’s company (based on occupation)
Type: str, optional
Todo
When a person’s occupation is changed, their company and department should too (#2)