Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (115 - 117 of 121)

Ticket Resolution Summary Owner Reporter
#21 duplicate yaml emitter bug xi rwb123@…

Reported by rwb123@…, 7 years ago.

Description

The following code produces bad yaml output, which subsequently dies in the yaml.load(). This is with pyyaml 3.0.3 on python 2.4.1.

import yaml

e = {"texas: '": 92.5}
yammy = yaml.dump(e)
print yammy
e2 = yaml.load(yammy)
print e2

The yaml output is:

$ python yamlbug2.py
{'texas: '': 92.5}

Traceback (most recent call last):
  File "yamlbug2.py", line 10, in ?
    e2 = yaml.load(yammy)
  File "/home/blahblah/dl/yaml/PyYAML-3.03/lib/yaml/__init__.py", line 61, in load
    return loader.get_data()
 ... etc.
#64 fixed yaml.dump and indentation: xi lal.george@…

Reported by lal.george@…, 6 years ago.

Description

In python, when I have :


y = {'x' : 3, z : [{'val' : 3}, {'val' : 4}]} yaml.dump(y, default_flow_style=False)


The result is: 'x: 3\nz:\n- val: 3\n- val: 4\n'

I believe there should be a space before each hypen.

Best,

Lal

#27 worksforme yaml.dump seems to be broken xi anonymous

Reported by anonymous, 7 years ago.

Description

I may be missing something here, but this seems to be broken:

Example that works:

>>> print yaml.dump({'name': "The Cloak 'Colluin'", 'depth': 5, 'rarity': 45, 'weight': 10, 'cost': 50000, 'flags': ['INT', 'WIS', 'SPEED', 'STEALTH']})
cost: 50000
depth: 5
flags: [INT, WIS, SPEED, STEALTH]
name: The Cloak 'Colluin'
rarity: 45
weight: 10

Portion of above example:

>>> print yaml.dump({'name': "The Cloak 'Colluin'", 'depth': 5})
{depth: 5, name: The Cloak 'Colluin'}

I would expect to get:

depth: 5
name: The Cloak 'Colluin'
Note: See TracQuery for help on using queries.