Monday, September 12, 2022

[FIXED] How is Python platform independent?

Issue

I know that Python is platform independent, but I don't understand how that works for CPython. If the interpreter and some of the modules are written in C, aren't those going to be platform dependent?


Solution

C is platform independent in the sense that it can be compiled for any machine for which a compiler is made to target that machine. That's why the Python source code is platform independent, even if a Python binary can only work on one platform.



Answered By - luther
Answer Checked By - Terry (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.