Changes between Version 15 and Version 16 of PyYAMLDocumentation


Ignore:
Timestamp:
05/07/06 03:36:50 (8 years ago)
Author:
xi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PyYAMLDocumentation

    v15 v16  
    11151115 
    11161116==== Resolver interface ==== 
     1117 
     1118The ''Resolver'' interfaces of '''`Loader`''' and '''`Dumper`''' are identical. 
     1119 
     1120{{{ 
     1121#!python 
     1122add_implicit_resolver(tag, regexp, first, Loader=Loader, Dumper=Dumper) 
     1123add_path_resolver(tag, path, kind, Loader=Loader, Dumper=Dumper) 
     1124 
     1125Loader.add_implicit_resolver(tag, regexp, first) # Loader.add_implicit_resolver is a class method. 
     1126Loader.add_path_resolver(tag, path, kind) # Loader.add_path_resolver is a class method. 
     1127 
     1128Dumper.add_implicit_resolver(tag, regexp, first) # Dumper.add_implicit_resolver is a class method. 
     1129Dumper.add_path_resolver(tag, path, kind) # Dumper.add_path_resolver is a class method. 
     1130}}} 
     1131 
     1132'''`add_implicit_resolver(tag, regexp, first)`''' adds an implicit tag resolver for plain scalars. 
     1133If the scalar value is matched the given `regexp`, it is assigned the `tag`. `first` is a 
     1134list of possible initial characters or `None`. 
     1135 
     1136'''`add_path_resolver(tag, path, kind)`''' adds a path-based implicit tag resolver. 
     1137A `path` is a list of keys that form a path to a node in the representation graph. 
     1138Paths elements can be string values, integers, or `None`. The `kind` of a node can 
     1139be `str`, `list`, `dict`, or `None`. 
    11171140 
    11181141