Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

remove declaration of private properties in classes #210

Open
dave-doty opened this issue Jul 21, 2022 · 0 comments
Open

remove declaration of private properties in classes #210

dave-doty opened this issue Jul 21, 2022 · 0 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@dave-doty
Copy link
Member

When I wrote fields such as Domain._name, I didn't realize this was a way to handle running code on field access:

https://python-course.eu/oop/properties-vs-getters-and-setters.php

i.e., just have an undeclared private field, while declaring a public "field" that's really implemented as a property. This will clean up the API a bit.

@dave-doty dave-doty added the invalid This doesn't seem right label Jul 21, 2022
@dave-doty dave-doty self-assigned this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant