Changes between Version 45 and Version 46 of PyYAMLDocumentation
- Timestamp:
- 11/22/09 16:58:56 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PyYAMLDocumentation
v45 v46 244 244 The function '''`yaml.safe_load`''' limits this ability to simple Python objects 245 245 like integers or lists. 246 247 A python object can be marked as safe and thus be recognized by '''`yaml.safe_load`'''. 248 To do this, derive it from `yaml.YAMLObject` (as explained in section 249 '''Constructors, representers, resolvers''') and explicitly set its class property 250 `yaml_loader` to `yaml.SafeLoader`. 246 251 247 252 … … 1026 1031 `safe_load` recognizes only standard YAML tags and cannot construct an arbitrary Python object. 1027 1032 1033 A python object can be marked as safe and thus be recognized by '''`yaml.safe_load`'''. 1034 To do this, derive it from `yaml.YAMLObject` (as explained in section 1035 '''Constructors, representers, resolvers''') and explicitly set its class property 1036 `yaml_loader` to `yaml.SafeLoader`. 1037 1028 1038 '''`safe_load_all(stream)`''' parses the given `stream` and returns a sequence of Python objects 1029 1039 corresponding to the documents in the stream. `safe_load_all` recognizes only standard YAML tags
