Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

config.Field fset and the like at creation #115

Closed Jaymon closed 3 years ago

Jaymon commented 4 years ago

I think I should support both fset=... and fsetter=... syntax, right now just fset=... works.

so these would be equivalent:

foo = Field(str, True, fset=lambda self, v: v.upper())
foo = Field(str, True, fsetter=lambda self, v: v.upper())

This would need to apply to all the things (eg, fset, fget, and iget)

Jaymon commented 3 years ago

I'm going to keep it similar to the property interface and with the new ways to customize the fields I don't think this is needed.