Author flox
Recipients flox
Date 2013-07-06.13:56:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373119013.09.0.814482152492.issue18383@psf.upfronthosting.co.za>
In-reply-to
Content
Much simpler:

$ ./python -Wd

import warnings
import sys
saved = warnings.filters.copy()

del sys.modules['warnings']
import warnings

assert warnings.filters != saved
assert warnings.filters.pop(0) = warnings.filters[0]
assert warnings.filters == saved

Explanation: the "default" filter is duplicated on each reload of the warnings module.
History
Date User Action Args
2013-07-06 13:56:53floxsetrecipients: + flox
2013-07-06 13:56:53floxsetmessageid: <1373119013.09.0.814482152492.issue18383@psf.upfronthosting.co.za>
2013-07-06 13:56:53floxlinkissue18383 messages
2013-07-06 13:56:52floxcreate