[Zope-dev] dtml-break
Evan Simpson
evan@digicool.com
Thu, 11 May 2000 20:36:49 -0400
----- Original Message -----
From: Jonothan Farr <jfarr@real.com>
> OK, thanks. I wasn't aware of these proposed changes. I suppose it makes
more
> sense then to just leave it as a downloadable patch for people that would
like
> the functionality right away (and wouldn't mind updating their dtml code
later).
Actually, it shouldn't be too hard to make the patch behave this way from
the start, so no code would need to be changed. Couldn't call it "break"
without more work than it's worth, tho, since that's a reserved word in
Python. Just add:
def stop(self):
raise BreakException, self
to the sequence_variables class in DT_InSV.py, and change each "except
BreakError: foo" clause into:
except BreakError, bobj:
if bobj == self.vars: foo
else: raise
and <dtml-call sequence-stop> should work. I think.
Cheers,
Evan @ digicool & 4-am