June 2017
Beginner to intermediate
274 pages
6h 49m
English
Now that we've got all the pieces, how do we put them together to achieve our goal? Well, first we make our animal objects and then use the SometimesLoud and Output classes to create our modified composite sequence and display it as shown in the following code example from animals.py:

Then, we need to schedule the run methods of each animal for asynchronous execution via asyncio, which happens implicitly in this example when we pass them as parameters together in our __main__.py file:

Our __main__.py file actually ...
Read now
Unlock full access