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
#97 wontfix Reader can be an instance variable in Scanner xi py4fun@…

Reported by py4fun@…, 5 years ago.

Description

Hi, thank you for PyYAML. Unfortunately I need to exchange YAML between Java and Python and Java does not have such a good library as PyYAML. There is a port of PyYAML (JvYAML) but it is dead.
I would like to develop the Java port further that it reaches the quality of PyYAML. To simplify maintenance I would like to be as close to the PyYAML API as possible.
May I propose to make Reader an instance variable in Scanner?
Can you please apply the attached patch to achieve the following:

  • improve encapsulation. Scanner and Reader can be instantiated and tested separately
  • Java can use the same approach (Java does not have multiple inheritance)

All the tests succeed.

Thank you,

Andrey

#102 fixed remove confusing comment xi py4fun@…

Reported by py4fun@…, 5 years ago.

Description

please remove confusing comment in parser (generators are not used in parser)

#103 wontfix example from http://yaml.org/type/yaml.html fails to parse xi py4fun@…

Reported by py4fun@…, 5 years ago.

Description

example from  http://yaml.org/type/yaml.html fails to parse. Is it a wrong example ? (I have found already a few...)

>>> text = open('yaml.yaml').read()
>>> print text
# The following node should NOT be serialized this way.
encoded YAML node :
 !!yaml '!' : '!type'
 !!yaml '&' : 12
 !!value = : value
# The proper way to serialize the above node is as follows:
node : !type &12 value

>>> print yaml.load(text)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\tools\Python25\lib\site-packages\yaml\__init__.py", line 58, in load
    return loader.get_single_data()
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 44, in get_single_data
    return self.construct_document(node)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 53, in construct_document
    for dummy in generator:
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 404, in construct_yaml_map
    value = self.construct_mapping(node)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 214, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 139, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 94, in construct_object
    data = constructor(self, node)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 420, in construct_undefined
    node.start_mark)
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!type'
  in "<string>", line 7, column 8:
    node : !type &12 value
           ^
>>>
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.