• Re: Is there a way to implement the ** operator (Posting OnPython-List Prohibited)

    From Lawrence D'Oliveiro@ldo@nz.invalid to comp.lang.python on Sat Feb 10 21:30:23 2024
    From Newsgroup: comp.lang.python

    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.
    --- Synchronet 3.20a-Linux NewsLink 1.114