Changeset 223 for pyyaml/trunk/lib/yaml
- Timestamp:
- 08/13/06 09:46:20 (6 years ago)
- Location:
- pyyaml/trunk/lib/yaml
- Files:
-
- 1 added
- 3 modified
-
__init__.py (modified) (1 diff)
-
composer.py (modified) (1 diff)
-
cyaml.py (added)
-
resolver.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/lib/yaml/__init__.py
r153 r223 8 8 from loader import * 9 9 from dumper import * 10 11 try: 12 from cyaml import * 13 except ImportError: 14 pass 10 15 11 16 def scan(stream, Loader=Loader): -
pyyaml/trunk/lib/yaml/composer.py
r222 r223 38 38 self.get_event() 39 39 40 self. complete_anchors = {}40 self.anchors = {} 41 41 return node 42 42 -
pyyaml/trunk/lib/yaml/resolver.py
r222 r223 75 75 76 76 def descend_resolver(self, current_node, current_index): 77 if not self.yaml_path_resolvers: 78 return 77 79 exact_paths = {} 78 80 prefix_paths = [] … … 96 98 97 99 def ascend_resolver(self): 100 if not self.yaml_path_resolvers: 101 return 98 102 self.resolver_exact_paths.pop() 99 103 self.resolver_prefix_paths.pop() … … 132 136 return tag 133 137 implicit = implicit[1] 134 exact_paths = self.resolver_exact_paths[-1] 135 if kind in exact_paths: 136 return exact_paths[kind] 137 if None in exact_paths: 138 return exact_paths[None] 138 if self.yaml_path_resolvers: 139 exact_paths = self.resolver_exact_paths[-1] 140 if kind in exact_paths: 141 return exact_paths[kind] 142 if None in exact_paths: 143 return exact_paths[None] 139 144 if kind is ScalarNode: 140 145 return self.DEFAULT_SCALAR_TAG
