"ast" <nom...@invalid.com> writes: > Let's invoke an obj method > > obj.funct() > > funct is first looked in ClassC, then if not found > on ClassB, then ClassA then object
If it helps: What you describe is attribute lookup, and it happens whether or not you're going to call the attribute. In other words, you need only invoke ‘foo.attr’ to have Python look for attribute ‘attr’ among the class hierarchy as you describe. Calling that attribute is a distinct operation once the attribute is found. > But is there a command to know where funct is found ? That's been answered, but I'm curious to know what your program will do with that information? -- \ “But Marge, what if we chose the wrong religion? Each week we | `\ just make God madder and madder.” —Homer, _The Simpsons_ | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list