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
class BaseRemoteStrip(BaseStripAnim):
color_control = 0
brightness_control = 100
Exactly the same effect, shorter, and it fixes the bug you have in your version, where you forgot to pass **args into the parent constructor.
:-)
Also, I suggest you not use protected (single _) variables at all! There's no compelling use case for them. They're all visible to children, so you have to preserve them as part of the API, so might as well make them public.
Private variables starting with __ are in fact hidden (mostly) but really, why bother?
The issue is "bondage vs discipline" :-D
Python is a more discipline-oriented language - let people change these variables if they like, particularly since they get to see your source code.
Particularly, you are actually changing these variables from other classes, so they aren't "protected" at all, now are they?
The text was updated successfully, but these errors were encountered:
Since I was here:
https://github.com/estiens/bibliopixel_projects/blob/9a2665d2e93dcf0d849865c9714d55883513570e/api/animations/base_remote_strip.py#L3-7
This could just be:
Exactly the same effect, shorter, and it fixes the bug you have in your version, where you forgot to pass
**args
into the parent constructor.:-)
Also, I suggest you not use protected (single
_
) variables at all! There's no compelling use case for them. They're all visible to children, so you have to preserve them as part of the API, so might as well make them public.Private variables starting with
__
are in fact hidden (mostly) but really, why bother?The issue is "bondage vs discipline" :-D
Python is a more discipline-oriented language - let people change these variables if they like, particularly since they get to see your source code.
Particularly, you are actually changing these variables from other classes, so they aren't "protected" at all, now are they?
The text was updated successfully, but these errors were encountered: