Repository: matplotlib/matplotlib
File: lib/matplotlib/artist.py (Python)

Code before:
        *errfmt* is used to generate error messages for invalid property
        names; it gets formatted with ``type(self)`` for "{cls}" and the
        property name for "{prop_name}".
        """
        ret = []
        with cbook._setattr_cm(self, eventson=False):
            for k, v in props.items():
                # Allow attributes we want to be able to update through
                # art.update, art.set, setp.
                if k == "axes":
                    ret.append(setattr(self, k, v))
                else:
                    func = getattr(self, f"set_{k}", None)
                    if not callable(func):
                        raise AttributeError(
                            errfmt.format(cls=type(self), prop_name=k),
                            name=k)
                    ret.append(func(v))
        if ret:
            self.pchanged()
            self.stale = True
        return ret

    def update(self, props):
        """
        Update this artist's properties from the dictionary *props*.

        Parameters
        ----------
        props : dict
            Dictionary of properties (keys) and their new values.

        Returns
        -------
        list
            A list of return values from the configured setters.

        Notes
        -----
        This method is similar to `.Artist.set`, but differs in two ways:

        1. **No Normalization**: It does not normalize property names. It only
           supports properties where a corresponding ``set_<prop>`` method
           explicitly exists.
        2. **No Validation**: It does not check for duplicate aliases. If both
           an alias and its full name are passed (e.g., ``{'lw': 1, 'linewidth': 2}``),
           the last value in the dictionary takes precedence, whereas `.set` would
           raise an error.

        For example, if an Artist defines ``set_property`` but not ``set_alias``,
        ``set(alias=1)`` will work (via normalization), whereas

Review comment (suggestion):
Per https://github.com/matplotlib/matplotlib/issues/30957#issuecomment-3833931797

```suggestion
        [*Discouraged*] Update this artist's properties from the dictionary *props*.
        
        .. admonition:: Discouraged
        
            This method exists for historic reasons. Please use `.Artist.set` instead.
            ``artist.update(props)`` is nowadays almost identical to
            ``artist.set(**props)`` with the only difference that ``set`` will
            additionally check that a property is not specified multiple times
            through aliases.
```

Code after:
        *errfmt* is used to generate error messages for invalid property
        names; it gets formatted with ``type(self)`` for "{cls}" and the
        property name for "{prop_name}".
        """
        ret = []
        with cbook._setattr_cm(self, eventson=False):
            for k, v in props.items():
                # Allow attributes we want to be able to update through
                # art.update, art.set, setp.
                if k == "axes":
                    ret.append(setattr(self, k, v))
                else:
                    func = getattr(self, f"set_{k}", None)
                    if not callable(func):
                        raise AttributeError(
                            errfmt.format(cls=type(self), prop_name=k),
                            name=k)
                    ret.append(func(v))
        if ret:
            self.pchanged()
            self.stale = True
        return ret

    def update(self, props):
        """
        [*Discouraged*] Update this artist's properties from the dictionary *props*.

        .. admonition:: Discouraged

            This method exists for historic reasons. Please use `.Artist.set` instead.
            ``artist.update(props)`` is nowadays almost identical to
            ``artist.set(**props)`` with the only difference that ``set`` will
            additionally check that a property is not specified multiple times
            through aliases.

        Parameters
        ----------
        props : dict
            Dictionary of properties (keys) and their new values.

        Returns
        -------
        list
            A list of return values from the configured setters.

        """
        return self._update_props(
            props, "{cls.__name__!r} object has no property {prop_name!r}")

    def _internal_update(self, kwargs):
        """