python - SpooledTemporaryFile: units of maximum (in-memory) size? -
the parameter max_size
of tempfile.spooledtemporaryfile()
maximum size of temporary file can fit in memory (before spilled disk). units of parameter (bytes? kilobytes?)? documentation (both python 2.7 , python 3.4) not indicate this.
the size in bytes. spooledtemporaryfile()
source code:
def _check(self, file): if self._rolled: return max_size = self._max_size if max_size , file.tell() > max_size: self.rollover()
and file.tell()
gives position in bytes.
i'd use of term size
in connection python file objects not expressed in bytes warrants explicit mention. other file methods deal in terms of size
work in bytes well.
Comments
Post a Comment