Modify

Ticket #220 (new defect)

Opened 2 years ago

Last modified 38 hours ago

yaml.dump indent parameter not affecting scalars in sequences

Reported by: xulfir@… Owned by: xi
Priority: low Component: pyyaml
Severity: minor Keywords:
Cc:

Description

It seems that scalars in sequences aren't being affected by yaml.dump's indent parameter. This can create odd alignment mismatches when alternate indent values are used.

In python:

y = ['a', {'b':'c','d':{'e':'f','g':'h'},'i':['j','k']}, ['l', {'m':'n', 'o':'p'}, ['q','r']]]
print yaml.dump(y, default_flow_style=False, indent=4)

I expect:

-   a
-   b: c
    d:
        e: f
        g: h
    i:
    -   j
    -   k
-   -   l
    -   m: n
        o: p
    -   -   q
        -   r

Instead I get:

- a
-   b: c
    d:
        e: f
        g: h
    i:
    - j
    - k
-   - l
    -   m: n
        o: p
    -   - q
        - r

Attachments

Change History

comment:1 Changed 38 hours ago by simas <kerdos@…>

 Cipto Junaedy is a customer research expert. "There are plenty of safe, effective HCA nutritional supplement out there. Finding one with  Unit Link Terbaik di Indonesia Commonwealth Life Investra Link 60% HCA with no food additives is vital."

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from xi. Next status will be 'new'
The owner will be changed from xi to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.