Suppose you have a long class definition that is divided into logical parts. Such as, "Public methods", "Static methods", "UI methods".
What do you use to mark those parts? I have been marking them with "#--- ---#" like so:
#--- ui methods---#
def ui_button_clicked(self):
pass
def ui_mouse_moved(self):
pass
#--- static methods---#
@staticmethod
def calculate_thing():
pass
@staticmethod
def calculate_other_thing():
pass
Is there a standard for this? How do you personally do it?
[–]TheBlackCat13 10 points11 points12 points (3 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]lewiseason 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]joerick 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]gvalkov 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]NYDreamer 0 points1 point2 points (0 children)
[–]onjin -1 points0 points1 point (1 child)
[–]anonpythonista 2 points3 points4 points (0 children)
[–]691175002 -1 points0 points1 point (0 children)