[Tutor] Beginner Q: What does the double underscore mean __ ?

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Sep 9 14:15:31 CEST 2012


On 09/09/2012 12:27, Aaron Pilgrim wrote:
> Hi,
> I was trying to teach myself some python from a book and I have seen
> double underscores used.
> What does the __ mean and how do I know when to use it?
>
> for example:
>
> __name__==’__main__’
>
> (source)
> Pilgrim, Mark (2009-10-23). Dive Into Python 3 (Books for
> Professionals by Professionals) (Kindle Locations 480-481). Apress.
> Kindle Edition.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

Start here http://docs.python.org/reference/datamodel.html#specialnames
Any questions please feel to ask as we don't bite :)

-- 
Cheers.

Mark Lawrence.



More information about the Tutor mailing list