ENع
الدرس 27 · Under the hood

Bytecode and the CPython VM

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

CPython runs your code in two stages. First the compiler turns the source into bytecode: small, simple instructions stored in a code object. Then a virtual machine runs those instructions one at a time, pushing and popping values on a stack. Follow a three-line program, bump.py, through both stages, read its bytecode with the dis module, and see how the VM speeds up code that runs often.

14 دقيقة11 خطوات5 أسئلةAdvanced
شكل 27 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.