Comp sci: Python modules
Self-tutoring about computer science: the tutor looks at what is meant by a module in Python.
Python has the notion of a module. Yet, what is a module, exactly?
A module, as I understand, is a .py file that contains re-usable code, such as classes and/or functions. The idea is that one can import what one needs from a module for one’s own purpose.
The idea of a Python module enables convenient, elegant organization. One might write a new module which includes relevant functions or classes from others, plus a few of one’s own, then submit it alongside the program which depends on it. Such an arrangement reduces the risk of certain dependencies being absent.
Source:
Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.
Leave a Reply
You must be logged in to post a comment.