parameters: (self,screen=None)
return_statement: return rects
docstring: Update the screen in a semi-efficient manner, and returns
          a list of pygame rects to be updated.
docstring_summary: Update the screen in a semi-efficient manner, and returns
          a list of pygame rects to be updated.
docstring_tokens: Update the screen in a semi - efficient manner and returns a list of pygame rects to be updated .
function: def update(self,screen=None):
          """Update the screen in a semi-efficient manner, and returns
          a list of pygame rects to be updated."""
          if (screen):
              self.screen = screen
  
          if self._chsize:
              self.resize()
              self._chsize = False
              return None
  
          if self._repaint:
              self.paint(self.screen)
              self._repaint = False
              rects = [pygame.Rect(0, 0,
                                   self.screen.get_width(),
                                   self.screen.get_height())]
          else:
              rects = container.Container.update(self,self.screen)
  
          if (self.appArea):
              # Translate the rects from subsurface coordinates into
              # full display coordinates.
              for r in rects:
                  r.move_ip(self.appArea.topleft)
  
          return rects
function_tokens: def update ( self , screen = None ) : if ( screen ) : self . screen = screen if self . _chsize : self . resize ( ) self . _chsize = False return None if self . _repaint : self . paint ( self . screen ) self . _repaint = False rects = [ pygame . Rect ( 0 , 0 , self . screen . get_width ( ) , self . screen . get_height ( ) ) ] else : rects = container . Container . update ( self , self . screen ) if ( self . appArea ) : # Translate the rects from subsurface coordinates into # full display coordinates. for r in rects : r . move_ip ( self . appArea . topleft ) return rects