Catherine Devlin <[email protected]> added the comment:
I think that it's possible to get the desired behavior by setting a filter to
"always".
```
> cat warnme.py
import warnings
for i in range(3):
warnings.warn("oh noes!")
> python warnme.py
warnme.py:4: UserWarning: oh noes!
warnings.warn("oh noes!")
> cat warnme2.py
import warnings
warnings.simplefilter("always")
for i in range(3):
warnings.warn("oh noes!")
> python warnme2.py
warnme2.py:5: UserWarning: oh noes!
warnings.warn("oh noes!")
warnme2.py:5: UserWarning: oh noes!
warnings.warn("oh noes!")
warnme2.py:5: UserWarning: oh noes!
warnings.warn("oh noes!")
```
Does that meet the need?
----------
nosy: +Catherine.Devlin
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue20131>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com