We just started to study class inheritance and attribute search in python. I have a question about the following code:
class a : n = 1
class b : n = 2
class c : n = 3
class d (a,b) : pass
class e (d,c) : pass
I know that en will be equal to 1 due to the nature of the attribute search procedure (depth search first). However, how do I access, say, the class cn from class e? I tried ecn but it gives me an error. Can someone tell me what I am doing wrong? Thanks in advance!
source
share