#NEWLINE# def __getitem__( self , index ) : #NEWLINE# #INDENT# 'Allow to access value array by index' #NEWLINE# if ( not self . __is_value_array ) : #NEWLINE# #INDENT# raise ValueError ( 'Report item is not value usage array' ) #NEWLINE# #UNINDENT# if ( index < self . __report_count ) : #NEWLINE# #INDENT# byte_index = int ( ( ( index * self . __bit_size ) // 8 ) ) #NEWLINE# bit_index = ( ( index * self . __bit_size ) % 8 ) #NEWLINE# return ( ( self . __value [ byte_index ] >> bit_index ) & ( ( 1 << self . __bit_size ) - 1 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise IndexError