Closed montefra closed 6 years ago
Commit 7b154ff remove DS9._privates = ['target', 'id', 'method']
attribute and the custom __setattr__
in favour of read only properties, defined using the property
decorator without the corresponding setter
.
This makes the code clearer (to me at least) and shouldn't require modifying the code for cases similar to #33.
@ericmandel I have one question:
In the original code, method
is set as a read only attribute, but it is not assigned to self.__dict__
like the other two methods. What should I do with it: remove it or assign it to some value (likely XPA_METHOD
)?
@montefra I think you should assign the read-only value of XPA_METHOD so that the user has an easy way to determine which method is being used. I'm sure that was my original (but unfulfilled?) intent ...
I think you should assign the read-only value of XPA_METHOD so that the user has an easy way to determine which method is being used. I'm sure that was my original (but unfulfilled?) intent ...
I'll do it soon
and now we have method
Thanks for doing this ... and fixing the original problem. Obviously, no one has really needed it, but I believe these minor details add to the quality and completeness of the implementation.
This first commit expose
ds9Globals
at module level as requested in #52.Next I want to see if it is possible to use the
property
decorator for the read only attributes inDS9
. I'll let you know if I have questions.