On Tue, Sep 11, 2012 at 12:45 PM, <e.doxta...@gmail.com> wrote: > All > > Python noob here. Trying to understand a particular syntax: > > class stuff: > def __init__(self): > self._bongo = "BongoWorld" > > ----------- > > What is the significance of the leading underscore in "self._bongo"? I've > seen this a few times and, after looking through PEP 8, I didn't see anything > relevant, but I could have missed it.
Single leading underscore is a convention indicating that the name should be considered private and not used externally. It's a softer version of the double leading underscore that means basically the same thing but has syntactic significance. -- http://mail.python.org/mailman/listinfo/python-list