Pergunta de entrevista da empresa Doran Jones

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

Resposta da entrevista

Sigiloso

4 de nov. de 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