#NEWLINE# @ classmethod #NEWLINE# def deserialize_safe( cls , byts , protocol_version ) : #NEWLINE# #INDENT# proto_version = max ( 3 , protocol_version ) #NEWLINE# p = 0 #NEWLINE# values = [ ] #NEWLINE# for col_type in cls . subtypes : #NEWLINE# #INDENT# if ( p == len ( byts ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# itemlen = int32_unpack ( byts [ p : ( p + 4 ) ] ) #NEWLINE# p += 4 #NEWLINE# if ( itemlen >= 0 ) : #NEWLINE# #INDENT# item = byts [ p : ( p + itemlen ) ] #NEWLINE# p += itemlen #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# item = None #NEWLINE# #UNINDENT# values . append ( col_type . from_binary ( item , proto_version ) ) #NEWLINE# #UNINDENT# if ( len ( values ) < len ( cls . subtypes ) ) : #NEWLINE# #INDENT# nones = ( [ None ] * ( len ( cls . subtypes ) - len ( values ) ) ) #NEWLINE# values = ( values + nones ) #NEWLINE# #UNINDENT# return tuple ( values )