Re: data hiding/namespace pollution

2005-10-31 Thread Steven Bethard
Alex Hunsley wrote: > The two main versions I've encountered for data pseudo-hiding > (encapsulation) in python are: > > method 1: > > _X - (single underscore) - just cosmetic, a convention to let someone > know that this data should be private. > > > method 2: > > __X - (double unders

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Martelli
Alex Hunsley <[EMAIL PROTECTED]> wrote: > There's no really specific questions in this post, but I'm looking for > people's thought on the issues within... > > > The two main versions I've encountered for data pseudo-hiding > (encapsulation) in python are: > > method 1: > > _X - (single unde

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Steven D'Aprano wrote: > On Mon, 31 Oct 2005 10:35:19 +, Alex Hunsley wrote: > > >>There's no really specific questions in this post, but I'm looking for >>people's thought on the issues within... >> >> >>The two main versions I've encountered for data pseudo-hiding >>(encapsulation) in pyt

Re: data hiding/namespace pollution

2005-10-31 Thread bruno at modulix
Alex Hunsley wrote: > bruno at modulix wrote: > >> Alex Hunsley wrote: >> (snip) >>> >>> method 1: >>> >>> _X - (single underscore) - just cosmetic, a convention to let someone >>> know that this data should be private. >>> >>> >>> method 2: >>> >>> __X - (double underscore) - mangles the na

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: > Alex Hunsley <[EMAIL PROTECTED]> writes: > > >>Btw, can you recall the subject line of the thread? I'd like to google groups >>for it and have a read of that thread... >>ta! > > > Search for: "alex martelli pychecker" on comp.lang.python... I don't have the > thread's name

Re: data hiding/namespace pollution

2005-10-31 Thread Steven D'Aprano
On Mon, 31 Oct 2005 10:35:19 +, Alex Hunsley wrote: > There's no really specific questions in this post, but I'm looking for > people's thought on the issues within... > > > The two main versions I've encountered for data pseudo-hiding > (encapsulation) in python are: > > method 1: > > _

Re: data hiding/namespace pollution

2005-10-31 Thread Jorge Godoy
Alex Hunsley <[EMAIL PROTECTED]> writes: > Btw, can you recall the subject line of the thread? I'd like to google groups > for it and have a read of that thread... > ta! Search for: "alex martelli pychecker" on comp.lang.python... I don't have the thread's name anymore. You'll probably find mor

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: > Alex Hunsley <[EMAIL PROTECTED]> writes: > > >>Sorry, I wasn't being clear. What I should have said is that I don't like the >>idea of a typo in an assignment causing the assigning of the wrong thing. >>e.g. imagine a simple value-holding class: >> >>class Values: >> pas

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: > Alex Hunsley <[EMAIL PROTECTED]> writes: > > >>Sorry, I wasn't being clear. What I should have said is that I don't like the >>idea of a typo in an assignment causing the assigning of the wrong thing. >>e.g. imagine a simple value-holding class: >> >>class Values: >> pas

Re: data hiding/namespace pollution

2005-10-31 Thread Jorge Godoy
Alex Hunsley <[EMAIL PROTECTED]> writes: > Sorry, I wasn't being clear. What I should have said is that I don't like the > idea of a typo in an assignment causing the assigning of the wrong thing. > e.g. imagine a simple value-holding class: > > class Values: > pass > > v = Values() > > v

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
bruno at modulix wrote: > Alex Hunsley wrote: > >>There's no really specific questions in this post, but I'm looking for >>people's thought on the issues within... >> >> >>The two main versions I've encountered for data pseudo-hiding >>(encapsulation) > > > > Hmmm... Are data-hiding and encaps

Re: data hiding/namespace pollution

2005-10-31 Thread bruno at modulix
Alex Hunsley wrote: > There's no really specific questions in this post, but I'm looking for > people's thought on the issues within... > > > The two main versions I've encountered for data pseudo-hiding > (encapsulation) Hmmm... Are data-hiding and encapsulation really the same things ? > i

data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
There's no really specific questions in this post, but I'm looking for people's thought on the issues within... The two main versions I've encountered for data pseudo-hiding (encapsulation) in python are: method 1: _X - (single underscore) - just cosmetic, a convention to let someone