From what I can tell, the <varname>:<classname> syntax is a purely cosmetic syntax used to give type hints for future programmers and for your linter/code editor so that it can give you useful type information. Note that since python is dynamically typed, putting type hint after a variable does not guarantee that the variable is of that type, just that you expect it do be. It is generally good practice for production code to include these type hints if the type of a variable is not obvious or implied by some other part of the code. Essentially, it is a fancy comment. Hope this helps!