# Path: hgvs/exceptions.py
# class HGVSUnsupportedOperationError(HGVSError):
#     pass
# 
# Path: hgvs/enums.py



import attr
from hgvs.exceptions import HGVSUnsupportedOperationError
from hgvs.enums import ValidationLevel
        :returns: A signed int for the net change in length.  Negative \
        values imply net deletions, 0 implies a balanced insertion and \
        deletion (e.g., SNV), and positive values imply a net \
        insertion.

        :raises HGVSUnsupportedOperationError: When determining the \
        length for this variant type is ill-defined or unsupported.

        There are many circumstances in which the net length change
        cannot be determined, is ill-defined, or is unsupported.  In
        these cases, the result depends on the value of
        `on_error_raise`: when `on_error_raise` is True, an exception
        is raised; when False, the exception is caught and `None` is
        returned.  Callers might wish to pass `on_error_raise=False`
        in list comprehensions to avoid dealing with exceptions.

        """

        try:
            ilen = self.pos._length()
            (del_len, ins_len) = self.edit._del_ins_lengths(ilen)
            return ins_len - del_len
        except HGVSUnsupportedOperationError:
            if on_error_raise:
                raise
            return None

    def validate(self):
        if self.pos:
            (res, msg) = self.pos.validate()

# Path: hgvs/exceptions.py
# class HGVSUnsupportedOperationError(HGVSError):
#     pass
# 
# Path: hgvs/enums.py



# Path: hgvs/posedit.py
import attr
from hgvs.exceptions import HGVSUnsupportedOperationError
from hgvs.enums import ValidationLevel

        :returns: A signed int for the net change in length.  Negative \
        values imply net deletions, 0 implies a balanced insertion and \
        deletion (e.g., SNV), and positive values imply a net \
        insertion.

        :raises HGVSUnsupportedOperationError: When determining the \
        length for this variant type is ill-defined or unsupported.

        There are many circumstances in which the net length change
        cannot be determined, is ill-defined, or is unsupported.  In
        these cases, the result depends on the value of
        `on_error_raise`: when `on_error_raise` is True, an exception
        is raised; when False, the exception is caught and `None` is
        returned.  Callers might wish to pass `on_error_raise=False`
        in list comprehensions to avoid dealing with exceptions.

        """

        try:
            ilen = self.pos._length()
            (del_len, ins_len) = self.edit._del_ins_lengths(ilen)
            return ins_len - del_len
        except HGVSUnsupportedOperationError:
            if on_error_raise:
                raise
            return None

    def validate(self):
        if self.pos:
            (res, msg) = self.pos.validate()

            if res != ValidationLevel.VALID: