I have the following python class:
class list_stuff: A = 'a' B = 'b' C = 'c' stufflist = [v for k,v in list_stuff.__dict__.items() if not k.startswith("__")] But it shows a NameError saying undefined variable list_stuff.
According to this, it should work.
I also tried with:
list_stuff().__dict__.items() But still same error. What am I missing here?