Philipp von Weitershausen wrote:
This is exactly what I would suggest: The function should return a list of validation errors. Similar semantics are used in zope.formlib's validate() method. I agree with Wichert's objection about being a bit confusing, though. Perhaps a better name than "validateSchema" could solve this problem, though I can't think of a good one right now... getValidationErrors() seems to naive...

I feel myself slipping into a bikeshed, so this may be my last comment on this.

I like "getValidationErrors". It's use would probably normally look something like this:

errors = getValidationErrors(...)
if errors:


errors = getValidationErrors(...)
if not errors:

Both look good to me.
Benji York
Senior Software Engineer
Zope Corporation
Zope3-dev mailing list

Reply via email to