Reusing Code with Modules and Packages


The primary motivation for humans to offload work to computers is that, for a human, the work is boring and repetitive. So it would be a shame if, every time you wanted a new program and you were building to include functionality you’d built before, you had to cut and paste every method and class definition from the earlier program into the new one by hand, or worse, rewrite them from scratch.


Import Statement Standard Library Random Module Module File Current Scope 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Tim Hall and J-P Stacey 2009

Personalised recommendations