On Aug 5, 2015, at 07:26, Paul Moore <p.f.moore@gmail.com> wrote:
On 5 August 2015 at 15:15, Ed Kellett <edk141@gmail.com> wrote: That said, there are solutions, and as far as I can tell it's the only problem that's been raised in the thread.
Are there solutions? No-one has come up with one, to my knowledge.
You need to cover
1. All of the many internal iterator types in Python:
type(iter([])) <class 'list_iterator'> type({}.keys()) <class 'dict_keys'> type({}.values()) <class 'dict_values'> type({}.items()) <class 'dict_items'>
These last three are not iterators, they're views. The fact that the OP and at least one person explaining the problem both seem to think otherwise implies that the problem is even bigger: we'd need to add the operator to not just all possible iterator types, but all possible iterable types. That's an even more insurmountable task--especially since many iterable types already have a perfectly good meaning for the + operator.