Skip to content

Item 25: Inconsistent method resolution order #40

@PeterDrake

Description

@PeterDrake

p. 71 describes MRO as "depth-first, left-to-right", but the example on p. 72 is breadth-first.

According to

http://docstore.mik.ua/orelly/other/python/0596001886_pythonian-chp-5-sect-2.html#pythonian-CHP-5-FIG-1

the former is "classic" and the latter is "new-style".

On a closely related note, in the paragraph after the last block of code on p. 72, it doesn't seem accurate to say that TimesFiveCorrect.__init__ calls PlusTwoCorrect.__init__; that's just the order in which those initializers are run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions