Does underscore has any special built-in meaningin Python ?
Jan Kaliszewski
zuo at chopin.edu.pl
Wed Jul 29 15:54:51 EDT 2009
29-07-2009 Benjamin Kaplan <benjamin.kaplan at case.edu> wrote:
> On Wed, Jul 29, 2009 at 1:59 PM, dandi kain <dandi.kain at gmail.com> wrote:
[snip
>> 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 ?
>
> It's just a convention for the most part. A single leading underscore
> is used for "private" attributes. Two leading underscores will affect
> the code-
Single leading underscore in some situations also affect the code...
See:
*
http://docs.python.org/reference/lexical_analysis.html#reserved-classes-of-identifiers
* http://docs.python.org/reference/datamodel.html#object.__del__
(in the the red "Warning" frame)
--
Jan Kaliszewski (zuo) <zuo at chopin.edu.pl>
More information about the Python-list
mailing list