This makes xreadlines behave like all other file methods
(other than close() which just returns).
Core and builtins
+- file.xreadlines() now raises a ValueError if the file is closed:
+ Previously, an xreadlines object was returned which would raise
+ a ValueError when the xreadlines.next() method was called.
+
Extension modules
Library
{
static PyObject* xreadlines_function = NULL;
+ if (f->f_fp == NULL)
+ return err_closed();
if (!xreadlines_function) {
PyObject *xreadlines_module =
PyImport_ImportModule("xreadlines");