[Tutor] How does it function
Steve Nelson
sanelson at gmail.com
Thu Mar 30 10:45:49 CEST 2006
On 3/30/06, Terry Carroll <carroll at tjc.com> wrote:
> On Wed, 29 Mar 2006, Steve Nelson wrote:
>
> > Simple answer - any python program you write is effectively a
> > 'module'. Modules have an attribute __name__. If you've imported the
> > module from elsewhere, the __name__ is set to the name of the module,
> > otherwise it is __name__.
>
> I don't mean to nitpick, but I see Steve had a small but crucial slip
> here. I think he means, " If you've imported the module from elsewhere,
> the __name__ is set to the name of the module, otherwise it is "__main__".
Yes absolutely - well spotted, and sorry for the typo.
S.
More information about the Tutor
mailing list