Code block literals
Dave Benjamin
ramen at lackingtalent.com
Thu Oct 9 14:29:01 EDT 2003
In article <bm48vh$47b$1 at bob.news.rcn.net>, Vis Mike wrote:
> [snip]
>
> Something like this seems more logical to me:
>
> for line in file('input.txt').lines:
> do_something_with(line)
>
> for byte in file('input.txt').bytes:
> do_something_with(byte)
I like that. =)
> Is it possible?
Depends on your definition of "possible".
Dave
--
.:[ dave benjamin (ramenboy) -:- www.ramenfest.com -:- www.3dex.com ]:.
: d r i n k i n g l i f e o u t o f t h e c o n t a i n e r :
More information about the Python-list
mailing list