Does underscore has any special built-in meaningin Python ?

Aahz aahz at pythoncraft.com
Fri Jul 31 19:09:16 EDT 2009


In article <062813eb-7eec-4504-b32c-abadf02c3e38 at 12g2000pri.googlegroups.com>,
dandi kain  <dandi.kain at gmail.com> wrote:
>
>What is the functionality of __ or _ , leading or trailing an object ,
>class ot function ? Is it just a naming convention to note special
>functions and objects , or it really mean someting to Python ?

One more thing: if you have global module names with a single leading
underscore (e.g. "_foo"), they will not be loaded when you use

from <module> import *

However, "import *" is strongly discouraged for the most part.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Many customs in this life persist because they ease friction and promote
productivity as a result of universal agreement, and whether they are
precisely the optimal choices is much less important." --Henry Spencer



More information about the Python-list mailing list