python is an interpreter so it does caching of the AST you can call it compiling but it's not as intense.
usually you have 4 to 5 steps in programming languages (the optimizer/interpreter/compiler part varies)
and the interpreter does the type inference in your case. Because think of it : type inference on dynamic data in a weak typed language* has to be done as the program gets executed otherwise how will it know what it is ?
The "compiled" data in python (I ignore pypy and such projects) is the optimized AST in Bytecode so the interpreter does not have to parse all files again but it's a cache not a compiled file :)
Edit: Thx Sai Kishore Komanduri for pointing out that's not a weak typed but a dynamic typed language. Didn't think it through :)