Re: Single leading dash in member variable names?

2012-11-10 Thread Aahz
In article , Ian Kelly wrote: >On Tue, Sep 11, 2012 at 12:45 PM, wrote: >> >> 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._bong

Re: Single leading dash in member variable names?

2012-09-12 Thread mdengler
On Wednesday, September 12, 2012 4:23:49 PM UTC+1, (unknown) wrote: > [...] David Goodger's "Code Like A Pythonista" in the "Naming" section [says > single leading underscore is bad form]. > (http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#naming) Looks like it says the opp

Re: Single leading dash in member variable names?

2012-09-12 Thread Ian Kelly
On Wed, Sep 12, 2012 at 9:23 AM, wrote: > > On Tuesday, September 11, 2012 5:02:31 PM UTC-5, Erik Max Francis wrote: > > On 09/11/2012 01:53 PM, me wrote: > > > PEP 8 says this is bad form. What do you think? > > > > > > > > Where does it say that? > > Apologies. It's in David Goodger's "Code Li

Re: Single leading dash in member variable names?

2012-09-12 Thread e . doxtator
On Tuesday, September 11, 2012 5:02:31 PM UTC-5, Erik Max Francis wrote: > On 09/11/2012 01:53 PM, me wrote: > > > On Tuesday, September 11, 2012 2:06:45 PM UTC-5, Ian wrote: > > >> On Tue, Sep 11, 2012 at 12:45 PM, I wrote: > > >>> What is the significance of the leading underscore in "self._b

Re: Single leading dash in member variable names?

2012-09-12 Thread Ian Kelly
On Tue, Sep 11, 2012 at 11:10 PM, Dwight Hutto wrote: > Not to jump in with another question(this seems somewhat relevant to the > conversation, maybe not), but is this similar to a private,public, or > protected class similar to the C type langs? More like "this is an implementation detail and i

Re: Single leading dash in member variable names?

2012-09-12 Thread Tim Chase
On 09/12/12 00:10, Dwight Hutto wrote: > Not to jump in with another question(this seems somewhat relevant > to the conversation, maybe not), but is this similar to a > private,public, or protected class similar to the C type langs? Close, but C-like languages tend to strictly enforce it, while in

Re: Single leading dash in member variable names?

2012-09-11 Thread Dwight Hutto
Not to jump in with another question(this seems somewhat relevant to the conversation, maybe not), but is this similar to a private,public, or protected class similar to the C type langs? -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/list

Re: Single leading dash in member variable names?

2012-09-11 Thread Erik Max Francis
On 09/11/2012 01:53 PM, e.doxta...@gmail.com wrote: On Tuesday, September 11, 2012 2:06:45 PM UTC-5, Ian wrote: On Tue, Sep 11, 2012 at 12:45 PM, I wrote: 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'

Re: Single leading dash in member variable names?

2012-09-11 Thread Terry Reedy
On 9/11/2012 4:53 PM, e.doxta...@gmail.com wrote: 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 indicati

Re: Single leading dash in member variable names?

2012-09-11 Thread Ian Kelly
On Tue, Sep 11, 2012 at 2:53 PM, wrote: > On Tuesday, September 11, 2012 2:06:45 PM UTC-5, Ian wrote: >> 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 mean

Re: Single leading dash in member variable names?

2012-09-11 Thread e . doxtator
On Tuesday, September 11, 2012 2:06:45 PM UTC-5, Ian wrote: > On Tue, Sep 11, 2012 at 12:45 PM, I wrote: > > > All > > > > > > Python noob here. Trying to understand a particular syntax: > > > > > > class stuff: > > > def __init__(self): > > > self._bongo = "BongoWorld" > > >

Re: Single leading dash in member variable names?

2012-09-11 Thread Ian Kelly
On Tue, Sep 11, 2012 at 12:45 PM, 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 t

Single leading dash in member variable names?

2012-09-11 Thread e . doxtator
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