namespace question
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Tue Dec 12 01:43:01 EST 2006
In <1165904406.053883.129610 at l12g2000cwl.googlegroups.com>,
jm.suresh at no.spam.gmail.com wrote:
> class Test:
> a = 1
> b = 2
> c = 1+2
>
> Now, all a,b and c would be directly visible to the user from the
> instance of Test. I am looking for a way to make only c directly
> visible from the instance.
Simplest way:
class Test:
c = 3
:-)
You know that `a`, `b` and `c` are class variables and not instance
variables!?
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list