4 ms·
attrs seems to be all over the place, but I find Schematics (http://schematics.readthedocs.io/en/latest/ http://schematics.readthedocs.io/en/latest/) much bette
by BerislavLopac 10y ago
attrs seems to be all over the place, but I find Schematics (http://schematics.readthedocs.io/en/latest/ http://schematics.readthedocs.io/en/latest/) much better designed and more powerful.
- asciihacker 10y agoYes, Schematics is impressive. Thank you, I added it to my list of Python OOP extensions [1]. I wonder why you need to supply a dictionary to the object instead of keyword pairs. [1] https://github.com/metaperl/python-oop https://github.com/metaperl/python-oop
- BerislavLopac 10y ago> I wonder why you need to supply a dictionary to the object instead of keyword pairs. My understanding is that the main reason is to make constructors more flexible, with arguments like _raw_data_, _trusted_data_ etc. But it is trivial to write a simple helper function that would accept keyword pairs and build a model instance.