Ignore:
Timestamp:
09/02/13 11:05:25 (8 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Rebase:
38323238613265633737366534633963326263633366393564373333653762656537363239643735
Message:

Support a common stylistic variation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/yamlish.py

    r102 r103  
    6464
    6565        if len(spaces) > indent():
    66             # Nested dict
    67             assert dm
    6866            assert parent_key
    69             stack.append((len(spaces), {}))
     67            if dm:
     68                # Nested dict
     69                stack.append((len(spaces), {}))
     70            elif lm:
     71                # Over-indented list in a dict
     72                stack.append((len(spaces), []))
    7073            stack[-2][1][parent_key] = obj()
    7174            parent_key = None
Note: See TracChangeset for help on using the changeset viewer.