-
Notifications
You must be signed in to change notification settings - Fork 1
Coding style guide.
James Draper edited this page Oct 26, 2016
·
1 revision
Below is an example of a class with the minimum number of functions that should be incorporated in a class.
class Example:
def __init__(self,data):
self.data = data
def addAttribute(self,attribute_name,attribute_data):
self.__dict__[attribute_name] = attribute_data
def __repr__(self):
return "Attributes: "+", ".join(list(self.__dict__.keys()))