19 Jul
2014
19 Jul
'14
2:55 p.m.
Le 19/07/2014 05:01, Steven D'Aprano a écrit :
I open a file with some record-separator
fp = open(filename, newline="\0")
Hmm... newline="\0" already *looks* wrong. To me, it's a hint that you're abusing the API. The main advantage of it, though, is that you can use iteration in addition to the regular readline() (or readrecord()) method. Regards Antoine.