The difference I see between your ruby example and python is that in the ruby example, @@foo is explicitly marked as a class variable. Without that, it’s not clear that is or that it should be.
class Base:
foo = 'bar'
foo = 'zap'
class Child(Base):
bar = foo # what is bar set to?
Remember as well that Base and Child might be in different files, or different packages altogether. If we say that foo should prefer the MRO lookup over the lookup in the surrounding scope, then it will be very easy to produce surprising results.