Alexey Muranov wrote:
   x = 42

   class C:
       x = x  # Works

I'd say it kind of works by accident, and is not really an
intended feature.

if Python does not allow to refer "simultaneously" to variables from different scopes if they have the same name.

It seems perfectly reasonable to me to have to use different
names to refer to different things in the same context. :-)

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

Reply via email to