[Python-Dev] Destructors and Closing of File Objects
Nikolaus at rath.org
Wed May 1 04:09:46 CEST 2013
Armin Rigo <arigo at tunes.org> writes:
> Hi Jeff,
> On Mon, Apr 29, 2013 at 11:58 PM, Jeff Allen <"ja...py"@farowl.co.uk> wrote:
>> In Jython, (...)
> Thanks Jeff for pointing this out. Jython thus uses a custom
> mechanism similar to PyPy's, which is also similar to atexit's. It
> should not be too hard to implement it in CPython 3 as well, if this
> ends up classified as a bug. This is what my bug report was about
> (sorry if I failed to be clear enough about it).
Personally, I think it should just be mentioned in the documentation for
the buffered writers. Otherwise it's hard to justify what deserves such
a special mechanism and what doesn't (what about e.g.
> Nikolaus: the bug report contains a failing test, is that what you're
> looking for?
That's what I was trying to write as well, yes. Now I know how to do it
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
More information about the Python-Dev