Changeset 136 for pyyaml/trunk/lib/yaml/error.py
- Timestamp:
- 04/15/06 19:54:52 (6 years ago)
- Files:
-
- 1 modified
-
pyyaml/trunk/lib/yaml/error.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/lib/yaml/error.py
r119 r136 49 49 50 50 def __init__(self, context=None, context_mark=None, 51 problem=None, problem_mark=None ):51 problem=None, problem_mark=None, note=None): 52 52 self.context = context 53 53 self.context_mark = context_mark 54 54 self.problem = problem 55 55 self.problem_mark = problem_mark 56 self.note = note 56 57 57 58 def __str__(self): 58 59 lines = [] 59 #for (place, mark) in [(self.context, self.context_mark),60 # (self.problem, self.problem_mark)]:61 # if place is not None:62 # lines.append(place)63 # if mark is not None:64 # lines.append(str(mark))65 60 if self.context is not None: 66 61 lines.append(self.context) … … 75 70 if self.problem_mark is not None: 76 71 lines.append(str(self.problem_mark)) 72 if self.note is not None: 73 lines.append(self.note) 77 74 return '\n'.join(lines) 78 75 79 80
