@deprecated('3.2', alternative='the ``.ver`` attribute or `Header.set`',
                pending=True)
    def update_ext_version(self, value, comment=None, before=None,
                           after=None, savecomment=False):
        """
        Update the extension version associated with the HDU.

        If the keyword already exists in the Header, it's value and/or comment
        will be updated.  If it does not exist, a new card will be created
        and it will be placed before or after the specified location.
        If no ``before`` or ``after`` is specified, it will be appended at
        the end.

        Parameters
        ----------
        value : str
            Value to be used for the new extension version

        comment : str, optional
            To be used for updating; default=None.

        before : str or int, optional
            Name of the keyword, or index of the `Card` before which the new
            card will be placed in the Header.  The argument ``before`` takes
            precedence over ``after`` if both are specified.

        after : str or int, optional
            Name of the keyword, or index of the `Card` after which
            the new card will be placed in the Header.

        savecomment : bool, optional
            When `True`, preserve the current comment for an existing
            keyword.  The argument ``savecomment`` takes precedence over
            ``comment`` if both specified.  If ``comment`` is not
            specified then the current comment will automatically be
            preserved.
        """

        if 'EXTVER' in self._header and savecomment:
            comment = None

        self._header.set('EXTVER', value, comment, before, after)
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/hdu/base.py/_ValidHDU.update_ext_version/original