Modify ↓
Ticket #180 (new defect)
Opened 2 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
Note: See
TracTickets for help on using
tickets.
