You cannot use A
until the class body has finished executing.
You can refer to 'local' names; the class body is executed as a function, and the local namespace of that function is used to supply the class attributes; within the class body, B
is a local name:
class A(object):
class B(object): pass
class C(B): pass