Hello! Python - 3 Interacting with the world

Chapter3まで読みました。このChapterでは、「電池付いてます」‥‥え〜っと標準ライブラリの使い方を学びます。

ライブラリのimportの仕方からモジュールの利用法、ファイルの読み書き、ディレクトリのトレースなどを見て行きます。プログラム課題は、md5を利用したファイル比較ツールの設計・インプリメントです。また、辞書型の使い方も学びます。

例によって、そこかしこにプログラム設計の金言がちらばめられています。たとえば、

You’ll need to avoid the temptation of reinventing the wheel. If a tool has already been written that solves your problem, it’s generally better to use that, or at least include it in your script if possible.

とかね。