Update of /cvsroot/docstring/dps/dps
In directory usw-pr-cvs1:/tmp/cvs-serv11161/dps/dps
Modified Files:
statemachine.py
Log Message:
- Added StateMachine.nextlineblank().
Index: statemachine.py
===================================================================
RCS file: /cvsroot/docstring/dps/dps/statemachine.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** statemachine.py 2001/08/25 03:55:14 1.7
--- statemachine.py 2001/09/12 03:45:42 1.8
***************
*** 252,255 ****
--- 252,262 ----
return self.line
+ def nextlineblank(self):
+ """Return 1 if the next line is blank or non-existant."""
+ try:
+ return not self.inputlines[self.lineoffset + 1].strip()
+ except IndexError:
+ return 1
+
def previousline(self, n=1):
"""Load `self.line` with the `n`'th previous line and return it."""
|