- 论坛徽章:
- 0
|
本帖最后由 wfnh 于 2012-03-13 23:40 编辑
- yaml.dump({'a':{'name': "The Cloak 'Colluin'", 'depth': 5, 'rarity': 45,'weight': 10, 'cost': 50000, 'flags': ['INT', 'WIS', 'SPEED', 'STEALTH'],'locate': {'item':'d:\\sdsa','monster':'e:\\dsfvsdfv'}},})
复制代码 为什么输出不是:
a:
cost: 50000
depth: 5
flags: [INT, WIS, SPEED, STEALTH]
name: The Cloak 'Colluin'
rarity: 45
weight: 10
locate:
item: d:\\sdsa
monster: e:\\dsfvsdfv
而是:
a:
cost: 50000
depth: 5
flags: [INT, WIS, SPEED, STEALTH]
locate: {item: 'd:\sdsa', monster: 'e:\dsfvsdfv'}
name: The Cloak 'Colluin'
rarity: 45
weight: 10
打印出来的格式不对啊·· |
|