Why are Modules not just native to Python?


#1

Hai World! :3
I am a complete noob to programing? coding? Please forgive me if I sound arrogant or of the alike, or if I placed this question in the wrong place.
I was wondering why are Modules not just native to Python? That is to say why does Python have Modules at all and just have it be part of Python? Where are they importing it from? do they import it though the internet? If its already with Python, then why have it separated?
Thank you for your time and consideration.

Sincerely,
Alice


#2

modules are native to python, python offers standard modules (which are shipped with python and can be imported). These modules are installed on your system

Including all modules into a python script by default would slow down execution time, so the people behind python need to decide what built-in function to include without importing, and what to put into external modules which we can import when we need them

we can also install additional modules from the internet, once installed, python handles them and we can import them


#3

Wow that was quick! Thank you stetim94! You’re the best ;3.

I see. it is for the performance of the script. code? I guess I can close this now but Idk how .3.


#4

Python is an interpreted language, so the code is interpreted at runtime (when you execute the program/script), so including all modules will slow this process down.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.