Website hosting service by Active-Venture.com
  

 Back to Index

5.2.4 What About Exceptions?

No problem, as long as the only output generated by the example is the traceback itself. For example:

 

>>> [1, 2, 3].remove(42)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: list.remove(x): x not in list
>>>

Note that only the exception type and value are compared (specifically, only the last line in the traceback). The various ``File'' lines in between can be left out (unless they add significantly to the documentation value of the example).

 

  

 

© 2002-2004 Active-Venture.com Webhosting Service

 

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

 

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

 

Cheap domain registration : Register domain name or buy domain name, including free domain hosting services

 
  Active-Domain.com offers cheap domain registration, domain name transfer and domain search services