I would like to write the +
operator for dictionaries.
I know a similar question has been asked before like here, but I would like to write the +
operator for a dictionary instead.
I know that it is possible to overload an operator in a custom class in Python. However I did not find how to overload an operator in a built-in class (if that is actually possible). Also since the +
operator is not defined for a dictionary in Python I wonder if that is possible at all?
I think this question has not been asked before on SO since I could not find something like it. Perhaps I just did not find the right terms to search for it. Another link that might be useful for that question.