I was just wondering, why the list/generator and standard "for" have disparities?<br><br>It would be really nice to be able to do:<br><br>for x in y if foo:<br>    ...<br><br>rather than:<br><br>for x in (x for x in y if foo):<br>
    ...<br><br>Also, from a style standpoint, I prefer to extract the loop logic into a function if it's more than a few lines long.  As a result, most of my loops are of the form:<br><br>for x in y:<br>    bar(x)<br>
<br>So I frequently end up using map.  As I understand it, there is some discussion of removing map() in favor of comprehensions.  Is there any reason why the for syntax could not be expanded to accommodate statements of the form:<br>
<br>bar(x) for x in y<br><br>?<br><br>This inconsistency really bothered me when I started playing with python, and it seems kind of at-odds with the "one right way to do things" mentality.<br><br>-Nathan<br>