Bad form to access a *private variable* like _foo?

seberino at spawar.navy.mil seberino at spawar.navy.mil
Tue May 6 00:32:36 EDT 2008


Bad form to access a *private variable* like _foo?

The reason I'm asking is that TurboGears/SQLObject mobel objects have
an attribute called "_connection" that must be used to manually commit
database stuff....

e.g.  MyObject._connection.commit()

It bugs me.  I don't know if it is a stylistic faux pas or not.

Is it?

Chris



More information about the Python-list mailing list