-
Notifications
You must be signed in to change notification settings - Fork 1
/
ModelProcedure.py
40 lines (36 loc) · 1.01 KB
/
ModelProcedure.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
DEBUG_MODE = True
import sys
class ModelProcedure:
def __init__(self):
self.symbol = []
def findObj(self, symbol, array):
# print("Init ModelProcedure")
table = array
i_found_it = False
for element in table:
# print(element)
# print(element[0])
# print(symbol)
if element[0] == symbol:
i_found_it = True
break
# print("End MdodelProcedure")
return i_found_it
def find(self, symbol, array):
# print("Init ModelProcedure")
table = array
i_found_it = False
element = None
for element in table:
# # print(element)
# # print("#### ### ###")
# # print(not True)
if element.id == symbol:
i_found_it = True
break
# print("End MdodelProcedure")
if i_found_it:
# print(element.id)
return element
else:
return None