[Zope] adding properties trough pythonscript
Sean Hastings
whysean at softhome.net
Thu Oct 21 16:22:22 EDT 2004
Cool!
I already have a whole bunch of code that uses this sort of error checking,
and I wanted to make sure that as long as I was careful to specify the
errors I am trapping that I don't have to rewrite it all.
Thanks.
> -----Original Message-----
> From: Dieter Maurer [mailto:dieter at handshake.de]
> Sent: Thursday, October 21, 2004 1:44 PM
> To: Sean Hastings
> Cc: massimop at users.berlios.de; zope list
> Subject: RE: [Zope] adding properties trough pythonscript
>
>
> Sean Hastings wrote at 2004-10-21 11:18 -0400:
> > ...
> >> >def fooEdit(self,REQUEST):
> >> > "foo is a string - foo2 is an int"
> >> > self.foo = REQUEST.get('foo','')
> >> > try:
> >> > self.foo2 = int(REQUEST.get('foo2',0)
> >> > except ValueError, e:
> >> > self.foo2 = 0
> >> >
> >
> >Then could I say that this would be an example in which catching SOME
> >exception CAN NOT result in inconsistent data?
>
> You can :-)
>
> --
> Dieter
More information about the Zope
mailing list