Just an extension of my memory - a way to remember all these little tricks I end up forgetting after a while.. Seen a few people use a blog for this.. seems useful

Monday, May 7, 2012

DeprecationWarnings in Python 2.7

If you're using Python versino 2.7, you may notice that the DeprecationWarning no longer displays. This has been de-activated by default, however, it can be switched back on by, for example, doing the following in iPython 


>>> import warnings 
>>> warnings.simplefilter("always") 

If you now call a deprecated class on purpose, iPython will display the full DeprecationWarning

No comments:

Post a Comment