STINNER Victor added the comment:

When warnings._showwarnmsg(), the io.FileIO object is not closed yet, so all 
attributes are accessible, which can be useful. Hopefully, the file is closed 
even if it is kept alive by the warning logger. So maybe it's ok to keep the 
Python object alive, if the underlying resource (the file descriptor) is 
released. I mean, it's not a big deal.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26567>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to