def set(self, value):
        """TODO: doc set()"""
        pairs = to_pairs(value)
        self._reset()

        seen = set()
        converted = True
        for key, value in pairs:
            if not self.may_contain(key):
                raise KeyError(
                    '%s %r schema does not allow key %r' % (
                        type(self).__name__, self.name, key))
            converted &= self[key].set(value)
            seen.add(key)
        required = set(self.iterkeys())
        if seen != required:
            missing = seen - required
            raise TypeError(
                'all keys required for a set() operation, missing %s.' % (
                    ','.join(repr(key) for key in missing)))
        return converted
dataset/ETHPy150Open jek/flatland/flatland/schema/containers.py/Mapping.set/swapped operands of `-`