[Python-ideas] + operator on generators

2017-06-25 Thread lucas via Python-ideas
Hello ! I often use generators, and itertools.chain on them. What about providing something like the following: a = (n for n in range(2)) b = (n for n in range(2, 4)) tuple(a + b) # -> 0 1 2 3 This, from user point of view, is just as how the __add__ operator works on lists and

Re: [Python-ideas] Expose a child factory using MappingProxyType in builtins

2017-02-28 Thread lucas via Python-ideas
I would be very happy to see a frozendict in collections :) Just for curiosity ; apart caching, is there any optimization that can be done on a frozendict implementation (over dict) ? I wonder if frozendict would be implemented as dict without modification methods, or as a particular object that