Message393873
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? |
|
Date |
User |
Action |
Args |
2021-05-18 14:00:44 | Catherine.Devlin | set | recipients:
+ Catherine.Devlin, inducer, r.david.murray |
2021-05-18 14:00:44 | Catherine.Devlin | set | messageid: <1621346444.8.0.721365060776.issue20131@roundup.psfhosted.org> |
2021-05-18 14:00:44 | Catherine.Devlin | link | issue20131 messages |
2021-05-18 14:00:44 | Catherine.Devlin | create | |
|