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

2017年11月09日 20:52:18 -0800

On 10 November 2017 at 14:34, Greg Ewing <[email protected]> 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 | [email protected] | Brisbane, Australia
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to