newbie question on class vars
JXSternChangeX2R
JXSternChangeX2R at gte.net
Mon Oct 7 21:00:39 EDT 2002
On Mon, 7 Oct 2002 16:06:26 -0700, Sean 'Shaleh' Perry
<shalehperry at attbi.com> wrote:
>then you want:
>
>class Foo:
> def __init__(self):
> self.__myvar = 1
>
>yes, you must use self (or whatever you call the variable). This is just the
>way things are. You learn to prefer it after using Python for a while and
>then going back to other languages.
De gustibus non disputandum.
J.
More information about the Python-list
mailing list