2009/5/8 Scott David Daniels <scott.dani...@acm.org>: > Li Wang wrote: >> >> So, if I am using python in Linux, do open('file', 'r') and >> open('file', 'rb') work the same way? > > You get identical results, but you ar lying to the reader of your code. > you should include the 'b' if what you want is bytes (or octets if you > prefer), and not use it if what you expect is "text." Your code > becomes less confusing by using 'b' properly, even if you see no > particular difference. > Thanks a lot, very helpful:D >
-- Li ------ Time is all we have and you may find one day you have less than you think -- http://mail.python.org/mailman/listinfo/python-list