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
Martin Li edited this page Jul 5, 2019
·
3 revisions
""" File description here"""# External library import# (1 empty line)# Internal library import# Import Example:fromxxximportxxximportxxxasxxx# (2 empty line)classxxx(xxx):
# (4 spaces or 1 tab)param=xxxdef__init__(self, parent: Object=None, *args, **kwargs):
super(self, <Replacewithparentclassname>).__init__(*args, **kwargs)
# define all class object that will be use on class functions# For example:# self.var = None# (1 empty line between class function) # add comment to class function if necessarydeffunc(self, param):
pass# private function begins with "_"def_func(self, param):
pass# use static method decorator to define function that can be called without an object for that class@staticmethoddefstatic_func(param):
pass# (2 empty line between classes/functions)classxxx(xxx):
pass# (2 empty line between classes/functions)deffunc(param):
pass