Modify

Ticket #180 (new defect)

Opened 3 years ago

"on" or "off" as node name becomes "True" or "False"

Reported by: s.p.helma@… Owned by: xi
Priority: normal Component: pyyaml
Severity: normal Keywords:
Cc:

Description

When loading a yaml document with node names "on" or "off" (or similar) the node names are stored as "True" or "False" in the dictionary:

>>> y = """
---
value: 3.14
on: 1
off: 2
"""
>>> yaml.safe_load(y)
{False: 2, True: 1, 'value': 3.1400000000000001}
>>> yaml.load(y)
{False: 2, True: 1, 'value': 3.1400000000000001}

IMHO this rewriting makes sense for the value, but not for the node name.

Stephan

Attachments

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.