June 2017
Beginner to intermediate
274 pages
6h 49m
English
Before we wrap up this section, I'd like to point out one thing that may be helpful down the road. Our example decorators that worked with annotations were all limited to keyword arguments for simplicity:

However, if you find yourself wanting to do similar things and also handle all sorts of parameters at the same time, the inspect package's signature function will simplify the process significantly.
So, function annotations are a great way of adding metadata to functions; however, they might affect the handling of functions later in all sorts of ways.
Read now
Unlock full access