BESSER-PEARL/BESSER

Inherited attributes missing from child class

Closed this issue · 1 comments

Aran30 commented

In a scenario where one class B inherits from another class A, accessing class B's attributes via

B.attributes

results in only the attributes that were defined in B to be returned and not the ones defined in the mother class A.

Note that in case A inherits from another class, then these attributes also need to be available in class B.

Solved in #14

Now you can use the all_attributes() method to get also inherited attributes of a class. Following your scenario,

B.all_attributes()