Ben Finney a écrit :
dandi kain <dandi.k...@gmail.com> writes:

What is the functionality of __ or _ , leading or trailing an object ,
class ot function ?

<OP>
Please note that in Python, classes and functions are objects too. But anyway, these underscores are part of *identifiers*, not objects themselves !-)
</OP>

    foo      Ordinary name, part of public interface
    _foo     Ordinary name, part of internal-only interface
    __foo    Ordinary name, but will be mangled (this style used rarely)
    __foo__  Name which is used in a special way by Python

And FWIW:

foo_ When you want to use a reserved name for identifier (ie: 'class_' , 'or_', 'and_' etc)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to