No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have a class containing: class CounterList: __n_comparisons__ = 0 def __init__(self, data=None): if data is None: self.data = [] else: self.data = data self.__n_accesses__ = 0 def __getitem__(self, i): self.__n_accesses__ += 1 return self.data[i] def __setitem__(self, i, item): self.__n_accesses__ += 1 if type(item) != CounterNode: raise ValueError("Only Counter objects … |
|
I would like my thread deleted because it is full of mistakes, it hasn't got any replies so I hope this will not be a problem. Thank you, the link is here: [Click Here](https://www.daniweb.com/software-development/python/threads/483954/help-with-classes) |