Nick Coghlan added the comment: I can add a third suggestion: a "HOWTO" guide on implementing and using file-like objects. It's actually a somewhat complex topic with various trade-offs involved, particularly in Python 3 where the differences between binary and text IO are greater. It could also point users to existing file-like objects that they may have missed (like the spooled temporary file support in tempfile).
On the more specific matter at hand, I think "close() is idempotent" is not only one of our most pervasive assumptions about file-like objects, but also an assumption we tend to make about resources *in general*. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21763> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com