How to except the unexpected?
bdesth.quelquechose at free.quelquepart.fr
Sat Mar 4 22:51:33 CET 2006
Rene Pijlman a écrit :
> Jorge Godoy:
>>>my app was surprised by an
>>>httplib.InvalidURL since I hadn't noticed this could be raised by
>>>robotparser (this is undocumented).
>>It isn't undocumented in my module. From 'pydoc httplib':
> That's cheating: pydoc is reading the source :-)
Yes, and that's the Right Thing(tm) to do. Source code don't lie. Source
code don't get out of sync. So source code *is* the best documentation
(or at least the most accurate).
> What I meant was, I'm calling robotparser, and there's no mention of
> exceptions on http://docs.python.org/lib/module-robotparser.html
That's why reading the source is better. CQFD !-)
More information about the Python-list