From: David Vallner Date: 2006-11-06T01:08:59+09:00 Subject: Re: how to know if i am in a module or in the main script ? --------------enig788235182AB01E4916B108FF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jeremy McAnally wrote: > I don't know about Ruby, but many times this is used in Python libs to > run example code if it's being run by itself and just be a library if > it's included. Pretty neat way of keeping the file clutter to a > minimum. >=20 By cluttering the file internally with code not related to its main purpose? I still claim laziness being the motive to not separate these things, half-decent code browsing and project management tools / project structuring conventions will negate any problems with finding code in files anyway. Either way, YMMV. I'll concede that this is more of a religious than technical issue for me, stemming from my preference to separate concerns as tidily as possible. David Vallner --------------enig788235182AB01E4916B108FF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFTgySy6MhrS8astoRAm5tAJ9FWnG6ijVH46+cQ2MELrTd7xid4gCfX0Fi US0T5Q1AGiLB/XO29uPXDUw= =71X8 -----END PGP SIGNATURE----- --------------enig788235182AB01E4916B108FF--