def _check_rename(self, oldname, newname):
        if oldname in '.' or '.' in newname:
            self.raise_exception("can't rename '%s' to '%s': rename only works"
                                 " within a single scope." %
                                 (oldname, newname), RuntimeError)
        if not self.contains(oldname):
            self.raise_exception("can't rename '%s' to '%s': '%s' was not found." %
                                 (oldname, newname, oldname), RuntimeError)
        if self.contains(newname):
            self.raise_exception("can't rename '%s' to '%s': '%s' already exists." %
                                 (oldname, newname, newname), RuntimeError)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/container.py/Container._check_rename/swapped operands of `in`