You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed several getters/setters in GenericClient. The implementations of the corresponding attributes is quite simple, and their (unlikely) changes would only impact feedspora itself and would be easy to manage without side effects. I think having direct read/write access to attributes would be enough and simplify the code.
OTOH, if there's a good reason I don't get yet to have getters and setters, they should probably be implemented with the @property (see here) to prevent direct access to attributes (and allow for more readable code when calling them).
The text was updated successfully, but these errors were encountered:
I don't know of any compelling reason why these need to stay, actually. I wonder if there would be any pylint impact, however - I see many complaints in the test code about accessing internal variables...
aurelg
changed the title
Are getters/setters in GenericClient required? If yes: use @property, if not: remove them.
Remove getters/setters in GenericClient, either use @property if they are required or remove them
Dec 16, 2018
wilddeej
added a commit
to wilddeej/feedspora
that referenced
this issue
Jan 29, 2019
Fixes Issue aurelg#41
No functionality changes.
Applied property decorators in various locations to improve code readability
and make it more "Pythonic".
I noticed several getters/setters in
GenericClient
. The implementations of the corresponding attributes is quite simple, and their (unlikely) changes would only impact feedspora itself and would be easy to manage without side effects. I think having direct read/write access to attributes would be enough and simplify the code.OTOH, if there's a good reason I don't get yet to have getters and setters, they should probably be implemented with the
@property
(see here) to prevent direct access to attributes (and allow for more readable code when calling them).The text was updated successfully, but these errors were encountered: