code: def clear(self):
          
          while len(self._extensions):
              key = sorted(list(self._extensions.keys()))[0]
              self.remove(key)
docs: Remove all extensions from the editor.
  
          All extensions are removed fromlist and deleted.