- 论坛徽章:
- 0
|
file.readlines([sizehint])¶
Read until EOF using readline() and return a list containing the lines thus read. If the optional sizehint argument is present, instead of reading up to EOF, whole lines totalling approximately sizehint bytes (possibly after rounding up to an internal buffer size) are read. Objects implementing a file-like interface may choose to ignore sizehint if it cannot be implemented, or cannot be implemented efficiently.
这是一个sizehint不是size,并且是rounding up,你需要知道系统的默认buffer size是多大:
import io
print io.DEFAULT_BUFFER_SIZE
很有可能你单个文件的大小没超超过buffer |
|