1. Home
  2. Computing & Technology
  3. Python

Python's Built-In Warnings

From , former About.com Guide

The following is a complete list of Python warnings that can be raised. While most of these are self-explanatory, I have added brief descriptions to them for sake of clarity; these are derived from the "Built-in Exceptions" module of the Python 2.5 documentation.


  • Warning: Base class for warning categories.

  • UserWarning: Base class for warnings generated by user code.

  • DeprecationWarning: Base class for warnings about deprecated features.

  • PendingDeprecationWarning: Base class for warnings about features which will be deprecated in the future.

  • SyntaxWarning: Base class for warnings about dubious syntax

  • RuntimeWarning: Base class for warnings about dubious runtime behavior.

  • FutureWarning: Base class for warnings about constructs that will change semantically in the future.

  • ImportWarning: Base class for warnings about probable mistakes in module imports. New in version 2.5.

  • UnicodeWarning: Base class for warnings related to Unicode. New in version 2.5.



Explore Python
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Python
  4. Python Library
  5. Python's Built-In Warnings>

©2009 About.com, a part of The New York Times Company.

All rights reserved.