ニュース

Pythonで開発を進めていると、自分で作成した便利なモジュールを再利用したくなる場面が増えてきます。最初はコピー&ペーストで対応していても、プロジェクトが増えるにつれて管理が煩雑になり、どのバージョンが最新か分からなくなることも。
モジュールの概要: モジュールはPythonの`ModuleType`オブジェクトで、一度インポートすると`sys.modules`にキャッシュされる。 インポートの仕組み: Pythonは`import`時にまず`sys.modules`を確認し、存在しなければ新しいモジュールを読み込んで実行する。 モジュール ...
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 ...