[issue34948] Document __warningregister__

2018-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And this case looks like playing with implementation details. The official way to make the specified warning emitted more than once is to use warnings.filterwarnings(): >>> import warnings >>> warnings.filterwarnings('always', "NOBODY expects the Spanish

[issue34948] Document __warningregister__

2018-10-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Wed, Oct 10, 2018 at 05:11:01AM +, Serhiy Storchaka wrote: > I don't think that it is necessary to state its format. It is an > opaque dictionary, and its format is an implementation detail. There is at least one use-case for wanting to manipulate

[issue34948] Document __warningregister__

2018-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think that it is necessary to state its format. It is an opaque dictionary, and its format is an implementation detail. -- nosy: +serhiy.storchaka ___ Python tracker

[issue34948] Document __warningregister__

2018-10-09 Thread Steven D'Aprano
New submission from Steven D'Aprano : The warnings module makes use of a per-module global ``__warningregister__`` which is briefly mentioned in the docs but not documented. https://docs.python.org/3/library/warnings.html#warnings.warn_explicit Given that it is part of the warn_explicit API,