#NEWLINE# def last( self ) : #NEWLINE# #INDENT# '\n        Returns the last object of a query, returns None if no match is found.\n        ' #NEWLINE# objects = list ( ( self . reverse ( ) if objects . ordered else self . order_by ( '-pk' ) ) [ : 1 ] ) #NEWLINE# if objects : #NEWLINE# #INDENT# return objects [ 0 ] #NEWLINE# #UNINDENT# return None