Antoine Pitrou <pit...@free.fr> added the comment: > > Also, is it ok to just return NULL or should the error state also be > > set? > > Well, I'm not sure, that why I made you and Amaury noisy :-) > AFAICT, this is the only case where _check_closed can encounter a NULL > self->writer.
Probably. OTOH, not setting the error state when returning NULL is usually an error (and can result in difficult-to-debug problems), so let's stay on the safe side. > Furthermore, I'm not sure about what kind of error would make sense here. RuntimeError perhaps. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13070> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com