@deprecated('3.2', alternative='the ``.name`` attribute or `Header.set`',
                pending=True)
    def update_ext_name(self, value, comment=None, before=None,
                        after=None, savecomment=False):
        """
        Update the extension name 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 name

        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 self._header in 'EXTNAME' and savecomment:
            comment = None

        self._header.set('EXTNAME', value, comment, before, after)
        # This may seem redundant, but the previous header.set call just
        # handles anyone who might use the before/after keywords to set the
        # position of the EXTNAME keyword.  Setting self.name = name does some
        # additional processing on the value such as handling
        # EXTENSION_NAME_CASE_SENSITIVE
        self.name = value
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/hdu/base.py/_ValidHDU.update_ext_name/swapped operands of `in`