class_docstr: This object implements a general K-way external merge sort for Python
  objects.
  
  >>> pool = MergePool()
  >>> # Add an unlimited number of items in any order
  >>> for item in my_items:
  ...     pool.add(item)
  ...
  >>> # Get the items back in sorted order
  >>> for item in pool.items():
  ...     print(item)
  
  This class uses the `marshal` module to write the items to temporary files,
  so you can only sort marshal-able types (generally: numbers, strings,
  tuples, lists, and dicts).
class_docstr_tok: ["This","object","implements","a","general","K-way","external","merge","sort","for","Python","objects",".",">",">",">","pool","=","MergePool","(",")",">",">",">","#","Add","an","unlimited","number","of","items","in","any","order",">",">",">","for","item","in","my_items",":","...","pool.add","(","item",")","...",">",">",">","#","Get","the","items","back","in","sorted","order",">",">",">","for","item","in","pool.items","(",")",":","...","print","(","item",")","This","class","uses","the","`","marshal","`","module","to","write","the","items","to","temporary","files",",","so","you","can","only","sort","marshal-able","types","(","generally",":","numbers",",","strings",",","tuples",",","lists",",","and","dicts",")","."]
docstr: Adds `item` to the pool to be sorted.
          
docstr_tok: ["Adds","`","item","`","to","the","pool","to","be","sorted","."]
code: def add(self, item):
      """Adds `item` to the pool to be sorted."""
  
      if len(self.current) >= self.maxsize:
          self.save()
      self.current.append(item)
  
file_path: whoosh/src/whoosh/externalsort.py
imports: from __future__ import with_statement
  import os, tempfile
  from heapq import heapify, heappop, heapreplace
  from whoosh.compat import dump, load
label_desc: Use image node_id 7 for calling the SortingPool obj's underlying member method code with example usage: obj.add(item) without return types