[Zope] adding properties trough pythonscript

Sean Hastings whysean at softhome.net
Thu Oct 21 11:18:54 EDT 2004


> >>   Catching *ANY* exception can cause inconsistencies in
> persistent data.
>
> The "any" refers to "any type of exception" (i.e. not only
> "ConflictError"). It does (of course) not mean that any exception
> catching does (with necessity) result in inconsistent persistent data.
> That's why there is a "can" in the sentence above...
>
> >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?




More information about the Zope mailing list