Matt Massie wrote:
In genericio.py, the _validateunion function looks like:
def _validateunion(schm, object):
for elemtype in schm.getelementtypes():
if validate(elemtype, object):
return True
return False
which I think only validates the first schema in a union. Shouldn't it
be...
No. It would validate all the schemas until one is found to be matching.
def _validateunion(schm, object):
for elemtype in schm.getelementtypes():
if not validate(elemtype, object):
return False
return True
instead?
If none of the schema matches, even then this would return true. no ?
-Matt