parameters: (self, n=None)
docstring: Delete all or first/last n of turtle's stamps.
  
          Optional argument:
          n -- an integer
  
          If n is None, delete all of pen's stamps,
          else if n > 0 delete first n stamps
          else if n < 0 delete last n stamps.
  
          Example (for a Turtle instance named turtle):
          >>> for i in range(8):
          ...     turtle.stamp(); turtle.fd(30)
          ...
          >>> turtle.clearstamps(2)
          >>> turtle.clearstamps(-2)
          >>> turtle.clearstamps()
docstring_summary: Delete all or first/last n of turtle's stamps.
docstring_tokens: Delete all or first / last n of turtle s stamps .
function: def clearstamps(self, n=None):
          """Delete all or first/last n of turtle's stamps.
  
          Optional argument:
          n -- an integer
  
          If n is None, delete all of pen's stamps,
          else if n > 0 delete first n stamps
          else if n < 0 delete last n stamps.
  
          Example (for a Turtle instance named turtle):
          >>> for i in range(8):
          ...     turtle.stamp(); turtle.fd(30)
          ...
          >>> turtle.clearstamps(2)
          >>> turtle.clearstamps(-2)
          >>> turtle.clearstamps()
          """
          if n is None:
              toDelete = self.stampItems[:]
          elif n >= 0:
              toDelete = self.stampItems[:n]
          else:
              toDelete = self.stampItems[n:]
          for item in toDelete:
              self._clearstamp(item)
          self._update()
function_tokens: def clearstamps ( self , n = None ) : if n is None : toDelete = self . stampItems [ : ] elif n >= 0 : toDelete = self . stampItems [ : n ] else : toDelete = self . stampItems [ n : ] for item in toDelete : self . _clearstamp ( item ) self . _update ( )