This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients benjamin.peterson, kristjan.jonsson, meador.inge, pitrou
Date 2012-04-16.21:39:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334612308.3426.13.camel@localhost.localdomain>
In-reply-to <1334612165.74.0.699758963229.issue8212@psf.upfronthosting.co.za>
Content
> static int
> _textiowrapper_clear(textio *self)
> {
>     if (self->ok && _PyIOBase_finalize((PyObject *) self) < 0)
>         return -1;
> 
> This shows something scary:  During a GC run, it is possible to invoke
> the  "close()" method on a textio object.  This is dangerous, and
> probably not allowed at all.

How is it scary? This is not worse than invoking a __del__ method.

> Returning -1 from a tp_clear() slot has no particular meaning, and the
> return value appears to be ignored by gcmodule.c

I don't think this is a problem.
History
Date User Action Args
2012-04-16 21:39:27pitrousetrecipients: + pitrou, kristjan.jonsson, benjamin.peterson, meador.inge
2012-04-16 21:39:27pitroulinkissue8212 messages
2012-04-16 21:39:27pitroucreate