On Thu, Aug 25, 2011 at 2:18 AM, Phil Blundell <ph...@gnu.org> wrote: > On Fri, 2011-08-19 at 15:11 -0700, Chris Larson wrote: >> But then, there's a tendency nowadays to avoid map/filter/etc, >> so that's probably not best :) > > Oh, is there? What's the objection to those constructs, out of > interest? I am quite fond of them myself.
Good question, I'm not sure what the reasoning is. I've read multiple documents around discussing idiomatic python that seem to feel that they should generally be dropped in favor of comprehensions and generator expressions. But, using that for something like this just looks rather silly in my opinion: [foo for foo in bar if foo]. *shrug*. Personally, I'm quite a fan of the functional programming methodology, but I do think using the functional style too much in python code tends to result in code which is extremely dense, and therefore harder to read, just due to how the language is, whether you compose generator expressions and comprehensions or you use map/filter/etc. -- Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core