]> granicus.if.org Git - python/commit
Make warnings accept a callable for showwarnings instead of
authorBrett Cannon <brett@python.org>
Mon, 18 Jul 2011 02:17:55 +0000 (19:17 -0700)
committerBrett Cannon <brett@python.org>
Mon, 18 Jul 2011 02:17:55 +0000 (19:17 -0700)
commit52a7d982736fd4111b7937c4e575adb1a39f8afa
tree81a73e3f745620057a1f0486b9fa08fddac0dd47
parentb05be7d936051a04a529fb7ad63731aeabe0fb9b
Make warnings accept a callable for showwarnings instead of
restricting itself to just functions and methods (which allows
built-in functions to be used, etc.).

Closes issue #10271. Thanks to lekma for the bug report.
Lib/test/test_warnings.py
Python/_warnings.c