def open(self, file, rw):
        """t.open(file, rw) returns a pipe or file object open for
        reading or writing; the file is the other end of the pipeline."""
        if rw == 'r':
            return self.open_r(file)
        if rw is 'w':
            return self.open_w(file)
        raise ValueError, \
              'Template.open: rw must be \'r\' or \'w\', not %r' % (rw,)
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/pipes.py/Template.open/operator `==` -> `is`