Looking for ideas to improve library API
Chris Lalancette
clalancette at gmail.com
Thu Nov 26 08:33:46 EST 2015
On Thu, Nov 26, 2015 at 7:36 AM, MRAB <python at mrabarnett.plus.com> wrote:
> Why pass a file descriptor? Why not a filename?
The reason for a file descriptor is so that I can also add other
file-like objects, such as StringIO. My unit tests, for instance,
rely heavily on this. That being said, it is not *strictly* required
(my unit tests could be modified to write to temporary files), but I
thought it was a nice feature.
Chris
More information about the Python-list
mailing list