示例#1
0
 def decode(pairs):
     if dataName not in pairs:
         print 'FrameColours: no event data called:', dataName, \
             'in:', pairs
         return class_([Colour(colours.errorColour)])
     else:
         parsed = parse.list_parser(pairs[dataName])
         return class_(special_view_decoder(elemClass)
             (parsed[0][0]), numBlankSlots)
示例#2
0
 def decode(pairs):
     if dataName not in pairs:
         print 'TwoDColours: no event data called:', \
             dataName, 'in:', pairs
         return class_([[Colour(colours.errorColour)]])
     else:
         parsed = parse.list_parser(pairs[dataName])
         return class_(parse.map2(special_view_decoder(elemClass), \
             parsed))