init python support

This commit is contained in:
fehrlich
2021-08-18 11:32:21 +02:00
parent 6543180591
commit aa3412e6ac
10 changed files with 349 additions and 7 deletions

7
demos/python/Person.py Normal file
View File

@@ -0,0 +1,7 @@
class Person:
def __init__(self, name, parents=None) -> None:
self.name = name
self.parents = [] if parents is None else parents
def addParent(self, parent: "Person"):
self.parents.append(parent)