User Tools

Site Tools


cs_lang:python:things-to-know:exceptions
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


cs_lang:python:things-to-know:exceptions [2010/12/12 17:29] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +<code python>
 +>>> a
 +Traceback (most recent call last):
 +  File "<stdin>", line 1, in <module>
 +NameError: name 'a' is not defined
 +</code>
  
 +<code python>
 +>>> try:
 +...   
 +... except:
 +...   print("'a' is not defined.")
 +... 
 +'a' is not defined.
 +</code>
cs_lang/python/things-to-know/exceptions.txt · Last modified: 2010/12/12 17:29 by 127.0.0.1