Custom Query (121 matches)
Results (31 - 33 of 121)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #38 | worksforme | PySyck handles non-alphanumeric strings as references, others not | xi | thomas@… |
| Description |
>>> 'a' is 'a' True >>> 'a.' is 'a.' True >>> syck.dump(['a', 'a']) '--- \n- a\n- a\n' >>> syck.dump(['a.', 'a.']) '--- \n- &id001 a.\n- *id001\n' >>> the first two commands show that python itself doesn't distinguish. This is especially problematic since the second case produces a segmentation fault when using syck-0.55-r3 (and surely other older versions). |
|||
| #39 | fixed | yaml.load("") raises an exception | xi | iusty@… |
| Description |
With the latest PyYAML (3.04): $ python
Python 2.4.4 (#2, Oct 19 2006, 23:03:48)
[GCC 4.1.2 20061007 (prerelease) (Debian 4.1.1-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.load("")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local//lib/python2.4/site-packages/yaml/__init__.py", line 66, in load
return loader.get_data()
File "/usr/local//lib/python2.4/site-packages/yaml/constructor.py", line 38, in get_data
return self.construct_document(self.get_node())
File "/usr/local//lib/python2.4/site-packages/yaml/composer.py", line 23, in get_node
return self.compose_document()
File "/usr/local//lib/python2.4/site-packages/yaml/composer.py", line 35, in compose_document
node = self.compose_node(None, None)
File "/usr/local//lib/python2.4/site-packages/yaml/composer.py", line 52, in compose_node
anchor = event.anchor
AttributeError: 'NoneType' object has no attribute 'anchor'
>>>
I think this is a bug - at least it should raise a yaml.scanner.ScannerError?, like yaml.load("'") does, and then it can be easily catched as a malformed stream. Right now, it's hard to deal with this. Thanks, Iustin |
|||
| #40 | worksforme | incomplete dict constructor | xi | dvd@… |
| Description |
Hi all, I'm puzzled by a strange behavior of yaml If you run the attached script you obtain an output like this: {'date': '732638', 'fields': {}, 'guid': '0000010f153544cf8a314808007f000000000001', 'expiration': None} {'date': '732638', 'fields': {'': {}, 'it': {'title': 'Hello World'}}, 'guid': '0000010f153544cf8a314808007f000000000001', 'expiration': None} *Please note the 'fields' value (I wrap the output to increase legibility)* the first line is printed inside this custom constructor function: def news_constructor(loader, node): nodes = loader.construct_mapping(node) print nodes return nodes the second line (the correct one) is the print of the return values of this function Can you help me or explain me this strange behavior? |
|||
