def __init__(self, value=None):
    if value is not None:
      self._buffer = StringIO(value)
    else:
      self._buffer = StringIO()
value -- a value to read from for stringio
dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/SublimeEvernote/lib/thrift/transport/TTransport.py/TMemoryBuffer.__init__