Example #1
0
    def __setitem__(self, key, item):
        if key != item.name:
            raise KeyError('Key "%s" is different from variable name "%s"!' % (key, item.name))
        odict.__setitem__(self, key, item)

        # Do not propagate id.
        item._set_id(None)
Example #2
0
    def __setitem__(self, key, item):
        if key != item.name:
            raise KeyError('Key "%s" is different from variable name "%s"!' % (key, item.name))
        odict.__setitem__(self, key, item)

        # Fix id in item.
        item._set_id(self._id)
Example #3
0
    def __setitem__(self, key, item):
        if key != item.name:
            raise KeyError('Key "%s" is different from variable name "%s"!' %
                           (key, item.name))
        odict.__setitem__(self, key, item)

        # Do not propagate id.
        item._set_id(None)
Example #4
0
    def __setitem__(self, key, item):
        if key != item.name:
            raise KeyError('Key "%s" is different from variable name "%s"!' %
                           (key, item.name))
        odict.__setitem__(self, key, item)

        # Fix id in item.
        item._set_id(self._id)