Code
class Foo:
bar = 1
def run(self, arg1=bar): # ok
# def run(self, arg1=Foo.bar): # fail
# def run(self, arg1=self.bar): # fail
# print(bar) # fail
print(Foo.bar) # ok
print(self.bar) # ok
Foo().run()
Question
Why do argument list and function body require different access patterns? Do they have different namespace rules? Where can I find authentic documentation about this?