Update of /cvsroot/docstring/dps/dps
In directory usw-pr-cvs1:/tmp/cvs-serv11404/dps/dps
Modified Files:
utils.py
Log Message:
- Renamed error reporter class to 'Reporter' from 'Errorist'.
Seemed clever at the time; seems less so now.
- Added docstrings.
Index: utils.py
===================================================================
RCS file: /cvsroot/docstring/dps/dps/utils.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** utils.py 2001/09/10 04:07:11 1.5
--- utils.py 2001/09/17 03:54:29 1.6
***************
*** 20,29 ****
! class Errorist:
def __init__(self, warninglevel, errorlevel, warningstream=sys.stderr):
self.warninglevel = warninglevel
self.errorlevel = errorlevel
self.stream = warningstream
def system_warning(self, level, comment=None, children=[]):
--- 20,36 ----
! class Reporter:
def __init__(self, warninglevel, errorlevel, warningstream=sys.stderr):
self.warninglevel = warninglevel
+ """The level at or above which warning output will be sent to
+ `self.stream`."""
+
self.errorlevel = errorlevel
+ """The level at or above which `SystemWarning` exceptions will be
+ raised."""
+
self.stream = warningstream
+ """Where warning output is sent."""
def system_warning(self, level, comment=None, children=[]):
|