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/2017-November/150443.html below:

[Python-Dev] [python-committers] Enabling depreciation warnings feature code cutoff

[Python-Dev] [python-committers] Enabling depreciation warnings feature code cutoff [Python-Dev] [python-committers] Enabling depreciation warnings feature code cutoffNick Coghlan ncoghlan at gmail.com
Thu Nov 9 23:49:13 EST 2017
On 10 November 2017 at 14:34, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Tres Seaver wrote:
>>
>> IIUC, that would be as expected:  you would see the warnings when running
>> your test suite exercising that imported code (which should run with all
>> warnings enabled), but not when running the app.
>
> But then what benefit is there in turning on deprecation
> warnings automatically for __main__?

Not all code has test suites, most notably:

- code entered at the REPL
- personal automation scripts
- single file Python scripts (as opposed to structured applications)

The tests for these are generally either "Did it do what I wanted?" or
else a dry-run mode where it prints out what it *would* have done in
normal operation.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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