Open beregond opened 10 years ago
Maybe add default
argument to BaseField? And default may be lambda or other function.
default
could be feature for itself, intention was to calculate some value from other ones (like compute event duration based on start and end date).
Maybe it is better to do through property
?
Such mechanisms are not very pythonic.
@hgenru - this lib started it's life as something that makes life easier when dealing with different apis and unfortunately apis sometimes ARE redundant :) Such field would allow to reduce this redundancy on your side IMO. Anyway will rethink this idea again.
Add field that that's value is an evaluation of some function.
Probably this feature would need to rewrite whole structure to descriptors.