Frank Sachsenheim

Results 320 comments of Frank Sachsenheim

yeah, then you have to tinker around. i related my comment to the i18n part that came up.

> Can you suggest me a better way to handle this? not really from a quick glance and no knowledge of the use-case (and i'm not interested in solving it),...

@pbrus , out of curiosity, why don't you use the [ErrorHandler](https://docs.python-cerberus.org/en/stable/errors.html#error-handlers) API?

everything works as expected. but indeed, it raises the point that there is no `None` type which would make this schema much simpler. mind that `type` can take multiple constraints.

of course `nullable` can be used with `oneof`, but your schema doesn't reflect your desired logic. that's why `{'x': {'type': ('string', 'number', 'none')}}` would be preferable.

your schema snippet says, the value can be `None` `AND` (must be a string `OR` a number).

> Incredibly counter-intuitive i'd argue that it'd be counter-intuitive when one rule with a certain constraint changes the semantics of another rule within a shared context.

problem is: we're both right. also, i can't come up with something such schema alteration could mess up.

could you please check out whether 74caea64b3d3a13c27f3dede0d59e8d3c0fd11aa solved this issue?

the docs are missing the fact that integers (and thus booleans) are also considered to be of `float` type. that behaviour was added five years ago, see a97293498581faf362ea9ba2f3b3a1be5f7c297d my advise...