なぜクラスにはアクセスできるのに、関数のローカルにはアクセスできないんですか?
なぜそういう仕組なのか。

class classname():
x = 10

def funcname():
y = 10

print(classname.x)←いける
print(funcname.y)←だめ