On Wed, Nov 8, 2017 at 10:33 PM, Nick Coghlan <ncoghlan at gmail.com> wrote: > For interactive use, the principle ends up being "Code you write gives > deprecation warnings, code you import doesn't" (which is the main > aspect I care about, since it's the one that semi-regularly trips me > up when I forget that DeprecationWarning is off by default). I with Antoine here. The idea that "code in __main__" is the set of code someone wrote really seems a lot like guessing (and not even very good guessing). If everyone follows the "keep __main__ small" then scripts won't automatically display deprecation warnings by default and so the original problem of "warnings are easy to miss" remains. Counter proposal -- why don't testing frameworks turn on warnings by default? E.g. like pytest-warnings? That way people running tests will see warnings and others won't unless they ask to see them.
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