• Re: Is there a way to implement the ** operator (Posting On Python-List

    From Lawrence D'Oliveiro@21:1/5 to Stefan Ram on Sat Feb 10 21:30:23 2024
    On 10 Feb 2024 13:24:39 GMT, Stefan Ram wrote:

    Consider subclassing collections.UserDict instead of dict and
    collections.UserString instead of str.

    The docs <https://docs.python.org/3/library/collections.html> say, for
    both of those:

    The need for this class has been partially supplanted by the
    ability to subclass directly from [the builtin type] ...

    I think the recommendation against subclassing builtin types was a
    holdover from Python 2.x days.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)