rh0dium wrote: > Hi all, > > Can someone help me out. I am trying to determing for each run whether > or not the test should pass or fail but I can't seem to access the > results .. > > Alternatively can someone suggest a better structure ( and a lesson as > to the reasoning ) that would be great too!! > > cells={} > > cells["NOR3X1"]= { > 'run' : [ 'lvs', 'drc' ], > 'results' : [{ 'lvs' : 'pass' }, > { 'drc' : 'fail' }] > } > > cells["OR3X1"] = { > 'run' : [ 'lvs' ], > 'results' : [{ 'lvs' : 'pass' }] > } > > cells["AND3X1"] = { > 'run' : [ 'drc' ], > 'results' : [{ 'drc' : 'fail' }] > } > >
other suggestions: cells={ "NOR3X1": { 'pass' : ['lvs'], 'fail' : ['drc'] }, "OR3X1" : { 'pass' : ['lvs'], 'fail' : [] }, "AND3X1" : { 'pass' : [], 'fail' : ['drc'] } } cells2={ "NOR3X1": [ ('lvs',1), ('drc', 0) ], "OR3X1" : [ ('lvs', 1) ], "AND3X1" : [ ('drc',0) ] } class cell(object): def __init__(self, id, passes=None, fails=None): self.id = id self.passes = passes or [] self.fails = fails or [] Gerard -- http://mail.python.org/mailman/listinfo/python-list