Website hosting service by

 Back to Index

3.20.1 Warning Categories

There are a number of built-in exceptions that represent warning categories. This categorization is useful to be able to filter out groups of warnings. The following warnings category classes are currently defined:

Class  Description 


Warning This is the base class of all warning category classes. It is a subclass of Exception.


UserWarning The default category for warn().


DeprecationWarning Base category for warnings about deprecated features.


SyntaxWarning Base category for warnings about dubious syntactic features.


RuntimeWarning Base category for warnings about dubious runtime features.


FutureWarning Base category for warnings about constructs that will change semantically in the future.


While these are technically built-in exceptions, they are documented here, because conceptually they belong to the warnings mechanism.

User code can define additional warning categories by subclassing one of the standard warning categories. A warning category must always be a subclass of the Warning class.





2002-2004 Webhosting Service


Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to


Cheap domain registration : Register domain name or buy domain name, including free domain hosting services offers cheap domain registration, domain name transfer and domain search services    

Domain registration : Buy domain name or register domain name from $5.95/year only