On Thu, 26 Mar 2009 17:01:40 -0000, Edd Barrett <vex...@gmail.com> wrote:

On Mar 26, 4:21 pm, Steven D'Aprano <st...@remove-this-
cybersource.com.au> wrote:
A few more comments, based on your code.

>    def __classdef_integer(self):

Double-underscore name mangling is often more trouble than it is worth.
Unless you really need it, not just think you will need it, it is
generally considered poor style.

It was an attempt at encapsulation. I didn't want my parser to call
internals willy-nilly.  Is there a better way?

The usual convention is to use a single leading underscore to mean
"this is private, please don't call/use/alter this."  Then don't
call/use/alter it from outside the class.  You don't really need
anything stronger than convention unless for some odd reason you
don't trust yourself.

--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to