parameters: (self)
return_statement: return messages
docstring: Return the list of messages currently present in the folder.
          As a side effect, set self.last to the last message (or 0).
docstring_summary: Return the list of messages currently present in the folder.
          As a side effect, set self.last to the last message (or 0).
docstring_tokens: Return the list of messages currently present in the folder . As a side effect set self . last to the last message ( or 0 ) .
function: def listmessages(self):
          """Return the list of messages currently present in the folder.
          As a side effect, set self.last to the last message (or 0)."""
          messages = []
          match = numericprog.match
          append = messages.append
          for name in os.listdir(self.getfullname()):
              if match(name):
                  append(name)
          messages = map(int, messages)
          messages.sort()
          if messages:
              self.last = messages[-1]
          else:
              self.last = 0
          return messages
function_tokens: def listmessages ( self ) : messages = [ ] match = numericprog . match append = messages . append for name in os . listdir ( self . getfullname ( ) ) : if match ( name ) : append ( name ) messages = map ( int , messages ) messages . sort ( ) if messages : self . last = messages [ - 1 ] else : self . last = 0 return messages