Custom Query (132 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 132)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#79 wontfix Multiple scalar values used as key creates Python hash error xi clay@…

Reported by clay@…, 6 years ago.

Description

The YAML specification suggests that a mapping can have a key made of more than one item, as in

? - Detroit Tigers
  - Chicago cubs
:
  - 2001-07-23

However, when that data is imported via yaml.load(), PyYAML exits with a yaml.constructor.ConstructorError?, saying "found unacceptable key (list objects are unhashable)"

Is there a way to force multi-value keys to be processed as tuples instead of lists?

#80 wontfix yaml.load doesn't work as i suspect it to according to the documentation xi anonymous

Reported by anonymous, 6 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?

#86 wontfix Use on socket connections with non blocking flag set xi oscar.ostlund@…

Reported by oscar.ostlund@…, 6 years ago.

Description

I am trying to use yaml as a communication language between processes that are connected through sockets. When I open sockets, I use non blocking sockets. Thus when libyaml tries to read the file with fread, it returns an error. Indeed, as the non blocking flag is set, when there is nothing more to read, the fread call returns EWOULDBLOCK.

As a hack, I have modified the yaml_file_read_handler function to return 1 if errno == EWOULDBLOCK and !ferror in the other cases...

What do you think ?

Thanks for your help

Oscar

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