Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I like the idea, but more as an exercise or a demonstration what can be done with Python. I also like that the code comes with a set of test cases which are written in a way that they nicely serve...
Answer
#1: Initial revision
I like the idea, but more as an exercise or a demonstration what can be done with Python. I also like that the code comes with a set of test cases which are written in a way that they nicely serve as user documentation. In fact, I could even imagine this example being used in a tutorial about the `__setattr__` etc. methods. However, unless there is a real use-case where such a feature is needed for some reason, I would rather not start using it only for the syntactic difference: For readers of code, such tricks increase the cognitive complexity. Having one idiomatic way of doing something makes things easier in most cases (https://peps.python.org/pep-0020): >There should be one -- and preferably only one -- obvious way to do it.