[EMAIL PROTECTED] wrote:
> I found myself writing:
>
> for f in [i for i in datafiles if '.txt' in i]:
> print 'Processing datafile %s' % f
>
> but I was wishing that I could have instead written:
>
> for f in in datafiles if '.txt' in f:
> print 'Processing datafile %s' % f
>
> Has there ever been a proposal for this?
probably. but unless your editor or keyboard is horribly broken, you
can of course press return at the right place instead:
for i in datafiles:
if '.txt' in i:
print 'Processing datafile %s' % f
(for this specific case, "endswith" is more reliable than "in", btw)
</F>
--
http://mail.python.org/mailman/listinfo/python-list