Sep-18-2019, 09:50 PM
In addition to what buran recommends, I would say document, document, document. Add a docstring to the class and each method:
class Dummy(object): """This is the docstring for the class.""" def foo(self, bar): """This is the docstring for the foo method."""In the docstring you put a description of the class or what the method does. You can also put in a list of methods and attributes for the class, or a list of parameters for a method. Docstrings help explain your code to other programmers (including yourself in six months) and are available with help(Class) or help(Class.method) in the interactive console.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures