Re: Looking for ideas to improve library API

2015-11-26 Thread Chris Lalancette
On Thu, Nov 26, 2015 at 7:46 AM, Devin Jeanpierre wrote: > Why not take ownership of the file object, instead of requiring users > to manage lifetimes? Yeah, I've kind of been coming to this conclusion. So my question then becomes: how do I "take ownership" of it? I already keep a reference to

Re: Looking for ideas to improve library API

2015-11-26 Thread Chris Lalancette
On Thu, Nov 26, 2015 at 7:36 AM, MRAB 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

Looking for ideas to improve library API

2015-11-26 Thread Chris Lalancette
-friendly. I'm looking for any ideas of how to do this better, or something I missed. Any input is appreciated! Thanks, Chris Lalancette -- https://mail.python.org/mailman/listinfo/python-list