#NEWLINE# def __getitem__( self , key ) : #NEWLINE# #INDENT# options = self . options . copy ( ) #NEWLINE# if ( type ( key ) is slice ) : #NEWLINE# #INDENT# if ( key . start is not None ) : #NEWLINE# #INDENT# options [ 'startkey' ] = key . start #NEWLINE# #UNINDENT# if ( key . stop is not None ) : #NEWLINE# #INDENT# options [ 'endkey' ] = key . stop #NEWLINE# #UNINDENT# return ViewResults ( self . view , key ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# options [ 'key' ] = key #NEWLINE# return ViewResults ( self . view , options )