#NEWLINE# def __getitem__( self , key ) : #NEWLINE# #INDENT# if isinstance ( key , basestring ) : #NEWLINE# #INDENT# for subcontext in subcontext : #NEWLINE# #INDENT# if ( key in subcontext ) : #NEWLINE# #INDENT# return subcontext [ key ] #NEWLINE# #UNINDENT# #UNINDENT# raise KeyError #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return super ( ContextList , self ) . __getitem__ ( key )