[Python-ideas] `to_file()` method for strings
Chris Barker
chris.barker at noaa.gov
Tue Mar 29 18:10:41 EDT 2016
On Tue, Mar 29, 2016 at 5:06 AM, Eric V. Smith <eric at trueblade.com> wrote:
> > 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.
>
> I agree this is not likely to ever happen. It's especially problematic
> that we'd be making this a requirement for implementations other than
> CPython.
>
Again -- this is a thought experiment, not a proposal, but:
It's only relevant for other implementations -- cPython already cleans up
the file object (any object) when it is no longer referenced.
And I do move the thought experiment along -- it was never specific to file
objects, but rather:
In the case of temporary objects that are never referred to outside a
single line of code -- delete it right away.
in theory, this could help all implementations leave a little less garbage
lying around.
Whether that is possible or desirable, I have no idea.
-CHB
>
> Eric.
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160329/8bdf4549/attachment.html>
More information about the Python-ideas
mailing list