I think this is a valid advice. However, there can also be (usually evenly spaced) grid lines, which are separate from axis lines. (The grid lines would extend the tick marks, probably with a thinner line and/or grey (or other colour) lines, than the axis lines.)
I have not used matplotlib (although I wrote a program in PostScript that does something similar), but I agree that the default is no good because the axis line is in the wrong place.