[Tutor] diving into py question
Chelan Farsight
chelan.farsight at gmail.com
Thu May 19 23:46:36 CEST 2005
Thanks!
You were right about the double underscore, however, I am still
getting the error on line 7...hrmm
any other ideas?
On 5/19/05, Max Noel <maxnoel_fr at yahoo.fr> wrote:
>
> On May 19, 2005, at 22:18, Chelan Farsight wrote:
>
> > I am using the online book Dive Into Python.
> > I ran the first program given and have run into an error on line 7 at
> > the colon. Now I imagine that there is probably a corrections page at
> > the site, but I am interested in knowing why it won't work as much as
> > what I need to do to correct it. Any help would be appreciated. The
> > script follows:
> >
> >
> > if_name_ == "_main_":
>
> The number of underscores is incorrect. "Magic" names in Python
> start and end with two underscores. The line should be changed to:
>
>
> if __name__ == "__main__":
>
>
> Hope that helps,
> -- Max
> maxnoel_fr at yahoo dot fr -- ICQ #85274019
> "Look at you hacker... A pathetic creature of meat and bone, panting
> and sweating as you run through my corridors... How can you challenge
> a perfect, immortal machine?"
>
>
More information about the Tutor
mailing list