Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Revisions

1 of 2

Python modules vs packages

I was reading a document and I encountered the part below:

A ​module​ is nothing more, nothingless than a directory with ​__init__.py​ file inside. It should contain other Python files with the logic related to the module's purpose.

Is this definition correct?

(As I know, a Python module is a file, whose extension is py, which contains Python code. And as I remember a directory which contains dunder init(init.py) file is called as Python package.)

lang-py

AltStyle によって変換されたページ (->オリジナル) /