Modules implicitly exposing exceptions from other modules

Fred L. Drake, Jr. fdrake at acm.org
Mon Feb 14 14:15:36 EST 2000


Jason Stokes writes:
 > I notice that the nntplib.NNTP class can throw exceptions from the
 > underlying socket module without documenting them.  What's good practice
 > when your module involves exposing exceptions from an implementation module
 > that client code might not necessarily be aware of?

  Document them if they would not be expected by an experienced
programmer.  In general, all network access can throw socket.error,
and that seems a reasonable expectation.
  If you think specific changes are appropriate to the documentation,
please send a patch (with disclaimers; http://www.python.org/patches/) 
to python-docs at python.org.


  -Fred

--
Fred L. Drake, Jr.	  <fdrake at acm.org>
Corporation for National Research Initiatives




More information about the Python-list mailing list