The lesson Andrew learned was
Do not trust documentation blindly; it could be wrong.
which is ok. Another, more important lesson to learn is
Program defensively, make sure every case is handled. (The Elements of Programming Style, Kernighan and Plauger, McGraw-Hill, 1978).
A third, more obscure lesson available for learning is
Sometimes talking to the duck isn't enough, and you should talk to something that will talk back.
"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko