【Python】ファイルが増えすぎたら「フォルダ」に整理。__init__.py の本当の使い方 Pythonでプログラムを書いていると、機能ごとにファイルを分割(モジュール化)していくことになります。 しかし、ファイルの数が増えてくると、今度は「ファイルだらけで ...
フォルダをモジュールとして成立させるためのファイルではなく、 「そのモジュールが何を API として公開するか」を定義するためのファイル。現代の Python では必須ではないが、設計を明確にするために使われる。
Once you know how to add and use a Python module, you will greatly extend the capabilities of the language. A Python module is an external class or set of functions that exist outside the main file of ...