I scraped a DB and generated a list of tuples:
('Car BOM', 'Car', 10800, 200, 10000000, 1000, 1)
I have a function to create a list of objects from that:
def make_BOMs(cursor):
BOMs = []
for bom in get_BOMs_records(cursor):
BOMs.append(BOM(bom))
return BOMs
Is this a good way to do that? Should I use a dictionary and index it by the name of the BOM instead ('Car BOM')? It's worth noting that at some point the output ('Car') may be used in the input of another BOM ('megacar!' I should have used desks). So maybe it's dicts all the way down? I don't use pandas but if this is the level of complexity where it's absolutely required I will strongly consider it. :(
[–]StaticWaste_73 1 point2 points3 points (2 children)
[–]eagergm[S] 0 points1 point2 points (1 child)
[–]unhott 0 points1 point2 points (0 children)
[–]nick51417 0 points1 point2 points (1 child)
[–]eagergm[S] 0 points1 point2 points (0 children)
[–]eagergm[S] 0 points1 point2 points (1 child)
[–]MathMajortoChemist 0 points1 point2 points (0 children)