#NEWLINE# def getKeyVehicle( self , decode = False ) : #NEWLINE# #INDENT# 'Returns the key vehicle code (or the decoded value), which is one part\n        of self.vehicles' #NEWLINE# if ( decode . vehicles != None ) : #NEWLINE# #INDENT# code = self . vehicles [ 0 ] #NEWLINE# if ( not decode ) : #NEWLINE# #INDENT# return code #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# decoder = { #NEWLINE# #INDENT# 'C' : 'car' , #NEWLINE# 'V' : 'van/ute' , #NEWLINE# 'X' : 'taxi/taxi van' , #NEWLINE# 'B' : 'bus' , #NEWLINE# 'L' : 'school bus' , #NEWLINE# '4' : 'SUV/4X4' , #NEWLINE# 'T' : 'truck' , #NEWLINE# 'M' : 'motorcycle' , #NEWLINE# 'P' : 'moped' , #NEWLINE# 'S' : 'bicycle' , #NEWLINE# 'K' : 'skateboard/in-line skater/etc.' , #NEWLINE# 'O' : 'other/unknown' , #NEWLINE# 'U' : 'other/unknown' , #NEWLINE# 'E' : 'pedestrian' , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return decoder [ code ] #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return None