Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dyn methods: Factor out instance var
This small refactoring prepares for a later commit that will switch to binding the methods to the class instead of to the instance. The instance attribute `prog` will not be available then anymore, because no instance exists yet at the time the class is created. Therefore, the reference is now replaced by the string `'dot'`. Note that this does not actually change the default value at all. It always got fixed to the value of `prog` at the time of function definition, which was always `'dot'`, as can be seen from line 1713. The default value already never changed along with the instance attribute value anymore after function definition. Side note: - One could argue that `None` would make a better default value here. However, changing that now would be changing the external behavior of the methods themselves, while this series aims to change the way in which they are created with minimal external effects. I plan to propose a switch to `None` together with other changes to `create_*`/`write_*` in another series, though. (This commit is part of a series of changes in how the `get_*`, `set_*`, `create_*` and `write_*` methods are dynamically created.)
- Loading branch information