#NEWLINE# def __getitem__( self , item ) : #NEWLINE# #INDENT# '\n        >>> Q.user.tags[0].name == \'My Tag\'\n        <Q: (AND: (\'user__tags__0__name\', \'My Tag\'))>\n\n        >>> Q.user.tags[0:1].name == "My Tag"\n        <Q: (AND: (\'user__tags__0_1__name\', \'My Tag\'))>\n\n        ' #NEWLINE# if isinstance ( item , slice ) : #NEWLINE# #INDENT# return QFactory ( '{}_{}' . format ( item . start , item . stop ) , self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return QFactory ( str ( item ) , self )