A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-September/104259.html below:

[Python-Dev] Resource leaks warnings

[Python-Dev] Resource leaks warnings [Python-Dev] Resource leaks warningsSteven D'Aprano steve at pearwood.info
Wed Sep 29 15:11:44 CEST 2010
On Wed, 29 Sep 2010 10:42:27 pm Antoine Pitrou wrote:

> My assumption is/was that the benefit of warning against leaks in
> real applications (or even - sigh - the standard library) would
> outweigh the inconvenience when hacking together a quick script.
>
> But if it doesn't, what about enabling it with a command-line switch?

I think the ability to detect such file descriptor leaks would be 
valuable, but I'm not sure that it should be running all the time. At 
the risk of bike-shedding, is it something which could be controlled at 
runtime, like garbage collection? E.g. something like:

gc.enable_file_warnings()
run_my_tests_for_leakage()
gc.disable_file_warnings()

or similar. (I'm not wedded to it being in the gc module.)

Otherwise, I'm +0.25 on enabling it with a command line switch, and -0 
on turning it on by default.


-- 
Steven D'Aprano
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4