Is there a way to overload the built-in function sum() so that it works on a user defined iterable? Assume the elements in the iterable can be added using +. For instance strings.
Specifically I want to be able to do the following
S = StrListIterable([<list of strings>])
concatedList = sum(S) # returns a concatenated string of all strings in S
I can obviously achieve this using a simple join statement on elements of S but I was wondering if Python offers support to overload some of the standard built-ins.