Whilst it was a nice idea in practice it's pretty awful to use and generally leads to lots of code duplication. That coupled with the horror of self not being set when the method is called.
I think it would generally be a lit nicer to provide Field definitions with extra_inputsextra_validatorsextra_processorsextra_outputs
An example definition would be something like.
@pipe
def my_validator(session):
#do some stuff ...
class FooMapper(Mapper):
id = field.Integer(extra_validators=[my_validator])
I think this will lead to a much cleaner, more predictable API all round.
Whilst it was a nice idea in practice it's pretty awful to use and generally leads to lots of code duplication. That coupled with the horror of
self
not being set when the method is called.I think it would generally be a lit nicer to provide
Field
definitions withextra_inputs
extra_validators
extra_processors
extra_outputs
An example definition would be something like.
I think this will lead to a much cleaner, more predictable API all round.