On 2014-03-30 18:59, Ram Rachum wrote:
If `map` accepted a tuple for its first argument, things like this:
stdout, stderr = map(str.strip, map(bytes.decode, popen.communicate()))
Could become this:
stdout, stderr = map((bytes.decode, str.strip), popen.communicate())
I think that the problem there is that it's not obvious in what order they are applied. You could, for example, argue that map((f, g) x) should do map(f, map(g, x) rather than map(g, map(f, x)).