Changes between Version 12 and Version 13 of PyYAML


Ignore:
Timestamp:
05/25/06 11:51:01 (9 years ago)
Author:
cce
Comment:

Example of catching errors.

Legend:

Unmodified
Added
Removed
Modified
  • PyYAML

    v12 v13  
    9090cost: 50000 
    9191depth: 5 
     92 
     93>>> try: yaml.load("---\nok: key\ninvalid:key") 
     94... except yaml.error.MarkedYAMLError, e: 
     95...    print e.problem_mark.line 
     96... 
     972 
     98 
    9299}}} 
    93100