J
Josef Wolf
Hello!
I'm new to python, so my first readings were the tutorial and the FAQs.
I got confused by some FAQ entries. Maybe some expert can help to clear the
confusion?
- FAQ entry 6.5: "What is delegation?"
AFAICS, the example in this FAQ-entry should create a derived class from
the file class. Therefore, shouldn't the first line of this class
definition read "class UpperOut(file):"?
How come self.__outfile to be the base class?
- FAQ entry 6.6:
This FAQ entry makes a difference between new-style classes and classic
classes. An example is given for the new style and a hint is given how a
classic class would look like. But I can't see any difference in them:
The new-style example starts with "class Derived(Base):" and the hint for
the classic class is "class Derived(Base): ..." So what's the difference?
What am I missing here?
I'm new to python, so my first readings were the tutorial and the FAQs.
I got confused by some FAQ entries. Maybe some expert can help to clear the
confusion?
- FAQ entry 6.5: "What is delegation?"
AFAICS, the example in this FAQ-entry should create a derived class from
the file class. Therefore, shouldn't the first line of this class
definition read "class UpperOut(file):"?
How come self.__outfile to be the base class?
- FAQ entry 6.6:
This FAQ entry makes a difference between new-style classes and classic
classes. An example is given for the new style and a hint is given how a
classic class would look like. But I can't see any difference in them:
The new-style example starts with "class Derived(Base):" and the hint for
the classic class is "class Derived(Base): ..." So what's the difference?
What am I missing here?