More than one main

Kagamin spam at here.lot
Thu Mar 24 06:55:17 PDT 2011


bearophile Wrote:

> I put in their main() some demo code that shows what this module does (and a main is useful to run unittests too, rdmd has the --main switch for this). Most of my Python modules have such demo main code, that runs only if you run them as main modules.
> 

unittests should be able to be a demo code for the module. Sometimes they say that unittests do demonstrate, how the module should work.


More information about the Digitalmars-d mailing list