From 17057f07f37f0cf6b0568d642aa856d3a4e91d9e Mon Sep 17 00:00:00 2001 From: Marcio Vicente Date: Fri, 23 May 2014 03:39:11 -0300 Subject: [PATCH] Remove uneccessary methods --- main.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/main.py b/main.py index 79fc0b6..5c81683 100644 --- a/main.py +++ b/main.py @@ -82,13 +82,6 @@ def mod(self, n): def is_position_mod(self, value, pos): return True if value % self.SIZE_OF_FILE is pos else False - def tail(self, obj): - self.file.seek(obj.index * self.STRUCT_SIZE + len(pickle.dumps(self.SIZE_OF_FILE))) - obj_tmp = pickle.loads(self.file.read()) - if obj_tmp.index: - self.tail(obj.index) - return obj.index - def insert_in_lisch(self, old_obj, new_obj, index=None): obj_next = None if old_obj.index: # if they has a next @@ -311,6 +304,7 @@ def remove(self, value, pos=None, next_id=None): if hasattr(obj, 'value'): current_pos = pos or self.get_current_position(value) + import pdb; pdb.set_trace() if value is obj.value: if obj.index: replace_obj = self.search_next(obj=obj, pos=current_pos) @@ -337,14 +331,6 @@ def search_next(self, obj, pos): return self.search_next(obj=obj.index, pos=pos) return False - # ############################### - # ########## TEMPORARY ########## - # ############################### - def print_flag(self): - self.open_file() - self.file.seek(0) - print pickle.loads(self.file.read()) - self.close_file() app = Application() app.main()