"Mohannad Mohammad" <mohannadmoham...@hotmail.com> wrote
my question about the meaning of buffering, and to be more accurate, what is the different when I use buffering and when I disable it while reading files?!

In practice I doubt if you will find much difference.
Buffering should produce a small performance gain and in theory it can improve stability if you have an unreliable storage device, but nowadays thats rarely an issue. There is a slight chance that someone could change the underlying file and you wouldn't notice because you are working from data in the buffer. (Although most modern OS will lock the file even for reading)

Personally I've never found buffering to be of any real impact for reading files. Writing files is another matter of course.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to