[Python-ideas] `to_file()` method for strings

Ethan Furman ethan at stoneleaf.us
Mon Mar 28 22:21:47 EDT 2016


[Sorry, Nick, didn't mean to just send it to you.]

On 03/28/2016 11:16 AM, Nick Eubank wrote:

> Just to make sure I follow: Chris, you're proposing a modification to
> garbage collection to clean up `open()` if `open()` is used by not
> closed and not assigned to anything so that `open(file).write(stuff)` is
> safe?

Even if he is, I don't see it happening.  Modifying the garbage 
collector to act sooner on one particular type of object when we already 
have good, if very mildly inconvenient, solutions is not going to be a 
high-priority item -- especially if it has /any/ negative impact on 
performance.

--
~Ethan~



More information about the Python-ideas mailing list