def TagProperty(tagName, tagType, default_or_func=None):
    def getter(self):
        if self.root_tag["Data"] not in tagName:
            if hasattr(default_or_func, "__call__"):
                default = default_or_func(self)
            else:
                default = default_or_func

            self.root_tag["Data"][tagName] = tagType(default)
        return self.root_tag["Data"][tagName].value

    def setter(self, val):
        self.root_tag["Data"][tagName] = tagType(value=val)

    return property(getter, setter)
dataset/ETHPy150Open mcedit/pymclevel/infiniteworld.py/TagProperty/swapped operands of `not in`