Doran Jones Interview Question

Is CPython compiled or interpreted? What is a .pyc file? Does Python have function overloading, and why?

Interview Answer

Anonymous

Nov 4, 2016

CPython is interpreted. A .pyc file is a compiled bytecode containing file that is created using the .py source code files. The .pyc file is then interpreted by CPython. Python does not have function overloading. Python uses duck typing and dynamic typing which are incompatible with function overloading. As of v3.4, however, Python does have functools.singledispatch, but it's not quite the same as function overloading.

1