def __init__(self, parent, offset=0, perms=None, size=None, **kwargs):
        """
        A copy on write copy of parent. Writes to the parent after a copy on
        write are unspecified.

        :param parent: the parent map.
        :param offset: an offset within the parent map from where to create the new map.
        :param perms: Permissions on new mapping, or None if inheriting.
        :param size: the size of the new map or max.
        """
        assert isinstance(parent, Map)
        assert offset >= 0 and offset < len(parent)
        if size is None:
            size = len(parent) - offset
        assert parent.start + offset + size <= parent.end
        if perms is None:
            perms = parent.perms

        super().__init__(parent.start + offset, size, perms, **kwargs)
        self._parent = parent
        self._parent.__setitem__ = False
        self._cow = {}
def __init__ ( self , parent , offset = 0 , perms = None , size = None , ** kwargs ) : assert isinstance ( parent , Map ) assert offset >= 0 and offset < len ( parent ) if size is None : size = len ( parent ) - offset assert parent . start + offset + size <= parent . end if perms is None : perms = parent . perms super ( ) . __init__ ( parent . start + offset , size , perms , ** kwargs ) self . _parent = parent self . _parent . __setitem__ = False self . _cow = { }
A copy on write copy of parent. Writes to the parent after a copy on
        write are unspecified.

        :param parent: the parent map.
        :param offset: an offset within the parent map from where to create the new map.
        :param perms: Permissions on new mapping, or None if inheriting.
        :param size: the size of the new map or max.