newbie question on class vars

Paul Moore gustav at
Mon Oct 7 21:45:56 CEST 2002

JXSternChangeX2R <JXSternChangeX2R at> writes:

> late bulletin:  saying "self.__gvar" inside fn1 and fn2 fixes, but I
> thought the idea was to avoid saying "self." all the time.

Nope, self.__gvar is entirely correct. You never get implicit access
to class variables. It's the old "explicit is better than implicit"
principle again.


More information about the Python-list mailing list