Demonstrate the use of Compostion of Atom objects.
- If the class has not been declared, use a ForwardTyped
- Note the use of lambda, because "Person" is not yet defined
- A Typed object can be instantiated three ways:
- Provide args, kwargs, or a factory in the definition
- Provide a _default* static constructor
- Provide a pre-created object in the constructor
Tip
To see this example in action, download it from composition <../../../examples/api/composition.py>
and run:
$ python composition.py
../../../examples/api/composition.py