[issue39189] Use io.DEFAULT_BUFFER_SIZE for filecmp BUFSIZE variable
New submission from Bahram Aghaei : Hello there, I was reading the `filecmp` module and I noticed that it defined the BUFSIZE manually, I think it's better to stick to the io.DEFAULT_BUFFER_SIZE variable for both consistency and easy to maintain in the future. Cheers, -- components: Library (Lib) messages: 359188 nosy: Bahram Aghaei priority: normal pull_requests: 17229 severity: normal status: open title: Use io.DEFAULT_BUFFER_SIZE for filecmp BUFSIZE variable type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue39189> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39189] Use io.DEFAULT_BUFFER_SIZE for filecmp BUFSIZE variable
Bahram Aghaei added the comment: Well, I think because the io module provides Python’s main facilities for dealing with various types of I/O, so using io.DEFAULT_BUFFER_SIZE is a kind of standard buffer size. I don't see any scientific reason for choosing the 8 * 1024 inside the filecmp module. My guess is that guy wanted to use something that is fairly small and would be okay in different circumstances (OSs) and the idea of DEFAULT_BUFFER_SIZE is the same thing. I think, the chances are high that in the future as computers reinforce, we might change the buffer size as well. So using the io.DEFAULT_BUFFER_SIZE will guarantee that we only change io.DEFAULT_BUFFER_SIZE and every module would be okay automatically? -- ___ Python tracker <https://bugs.python.org/issue39189> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com