Ignore:
Timestamp:
08/03/06 12:07:29 (8 years ago)
Author:
xi
Message:

Subclass all base classes from object.

Hold references to the objects being represented (should fix #22).

The value of a mapping node is represented as a list of pairs (key, value)
now.

Sort dictionary items (fix #23).

Recursive structures are now loaded and dumped correctly, including complex
structures like recursive tuples (fix #5). Thanks Peter Murphy for the patches.
To make it possible, representer functions are allowed to be generators.
In this case, the first generated value is an object. Other values produced
by the representer are ignored.

Make Representer not try to guess !!pairs when a list is represented.
You need to construct a !!pairs node explicitly now.

Do not check for duplicate mapping keys as it didn't work correctly anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/emitter.py

    r218 r222  
    1717    pass 
    1818 
    19 class ScalarAnalysis: 
     19class ScalarAnalysis(object): 
    2020    def __init__(self, scalar, empty, multiline, 
    2121            allow_flow_plain, allow_block_plain, 
     
    3131        self.allow_block = allow_block 
    3232 
    33 class Emitter: 
     33class Emitter(object): 
    3434 
    3535    DEFAULT_TAG_PREFIXES = { 
Note: See TracChangeset for help on using the changeset viewer.