Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (22 - 24 of 121)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Ticket Resolution Summary Owner Reporter
#80 wontfix yaml.load doesn't work as i suspect it to according to the documentation xi anonymous

Reported by anonymous, 5 years ago.

Description

quote from the documentation:

>>> class Monster(yaml.YAMLObject):
...     yaml_tag = u'!Monster'
...     def __init__(self, name, hp, ac, attacks):
...         self.name = name
...         self.hp = hp
...         self.ac = ac
...         self.attacks = attacks
...     def __repr__(self):
...         return "%s(name=%r, hp=%r, ac=%r, attacks=%r)" % (
...             self.__class__.__name__, self.name, self.hp, self.ac, self.attacks)

>>> yaml.load("""
... --- !Monster
... name: Cave spider
... hp: [2,6]    # 2d6
... ac: 16
... attacks: [BITE, HURT]
... """)

the thing is, yaml.load ignores the __init__ method of the Monster class. it doesn't even matter if it's there at all. in yaml.load you can specify aditional variables and they get added to the object. intended behaviour?

#81 worksforme syck.dump is broken xi anonymous

Reported by anonymous, 5 years ago.

Description

syck.dump fails on even simple mappings:

>>> import syck
>>> doc = '''
... a: 1
... b: 2
... c: 3
... '''
>>> syck.load(doc)
{'a': 1, 'c': 3, 'b': 2}
>>> syck.dump(syck.load(doc))
'--- {}\n\n'
>>>

This is PySyck 0.61.2.

$ python --version
Python 2.5.2
$ uname -a
Linux brainsplit 2.6.24 #2 SMP Thu May 1 13:57:17 UTC 2008 x86_64 GNU/Linux
$ 

Cheers.

#84 worksforme how to install PyYaml to a linux xi anonymous

Reported by anonymous, 5 years ago.

Description

Hi,

I installed the PyYaml? both to a linux machine and a window machine. When I run command "import _yaml", the window machine can find the module. But on the linux, it can not find the module. I found _yaml.pyd file under the site-packages, I did not find any file with _yaml at the linux machine. I find the files (_yaml.c _yaml.h _yaml.pxd _yaml.pyx) under ext directory in the download package. What am I missing?

Thanks, -Yuan

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Note: See TracQuery for help on using queries.