"ast" <nomail@com.invalid> writes:
> ...
> So it seems that when an object's méthod is executed, variables
> in the scope outside the object's class can be read (2nd example),
> but not variables inside the class (1st example).
>
> For 1st example, I know that print(MyClass.a) or print(self.a)
> would have work.
>
> Any comments are welcome.

You are right. And it is documented this way.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to