Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support type and value validation for native fields (on first access only) ? #18

Closed
smarie opened this issue Oct 3, 2019 · 1 comment
Labels
wontfix This will not be worked on

Comments

@smarie
Copy link
Owner

smarie commented Oct 3, 2019

This would provide a strict equivalent of attrs behaviour. But for which usage ?

I would rather enable this only for classes that are read-only, so that the behaviour is intuitive.

@smarie smarie added the enhancement New feature or request label Oct 3, 2019
@smarie
Copy link
Owner Author

smarie commented Oct 17, 2019

As of now there is no concept in python for descriptors with only a __set__ method and no __get__. (we should maybe make a pep :) )

So we're left with putting that in the constructor... which is exactly what attrs does, and would break the "isolation" philosophy. So won't fix

@smarie smarie added wontfix This will not be worked on and removed enhancement New feature or request labels Oct 17, 2019
@smarie smarie closed this as completed Oct 17, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant