Most of my projects are on Bitbucket at the moment but will be moved to GitHub soon due to the shutdown of mercurial support.
See: https://bitbucket.org/labscript_suite/
Location
Australia
Education
PhD (Physics), BSc Advanced with honours (first class honours in Physics, majors: physics, maths)
Agreed. Using getattr and setattr is really only pythonic when the attribute name is variable.
The language in this article is also completely wrong. They seem to call attributes 'properties' which are actually a completely different thing in python (but also uses the phrases: getters and setters)
I feel like the author is very confused about all of this.
I also agree with these comments. Furthermore, this will completely break all help a good ide or text editor will give you, like suggestions and auto-completion. I have never seen this style of coding before. You usually define all fields of a class inside the dunder init method of the class.
Agreed. Using
getattr
andsetattr
is really only pythonic when the attribute name is variable.The language in this article is also completely wrong. They seem to call attributes 'properties' which are actually a completely different thing in python (but also uses the phrases: getters and setters)
I feel like the author is very confused about all of this.
I also agree with these comments. Furthermore, this will completely break all help a good ide or text editor will give you, like suggestions and auto-completion. I have never seen this style of coding before. You usually define all fields of a class inside the dunder init method of the class.