I assume you're using IDLE? I do get the error with IDLE in Python 2.5.
I'm thinking your interpreter cached the functions when you were writing and running it. Then, when you moved the bottom three lines to the top, it had already known where the functions are because they were cached by the precompiler.
Try saving the finalized script as a new file, then run that. You should see the error. If not, you simply have a different implementation of Python, or one that behaves differently on a different machine. For all we know, mine and the author's Python could be the ones behaving "incorrectly".
Nevertheless... don't worry about it. The main point of that section in the tutorial was to reinforce the notion:
- A function's contents are defined with a def block.
- The contents are called with the appropriate function name when you need the function to execute.
- The logical ordering of these two events is
A, B. So it's conventional to keep them ordered that way in your code.
When the interpreter already does that for you, it merely becomes a coding convention.