Bug report
Bug description:
While developing one of my personal projects I encountered this unexpected and unintuitive behaviour:
I could not use a class variable of a parent class as a default argument of one of his sub classes.
class Parent_Class:
a = 1
class Sub_Class:
def method(x = Parent_Class.a): #! "Parent_Class" is not defined
...
I think this is not intended as it is not intuitive nor logical, therefore I frame it as a bug.
Hoping to help.
CPython versions tested on:
3.13
Operating systems tested on:
Windows