Custom Query (121 matches)
Results (43 - 45 of 121)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #51 | fixed | Won't emit a document until the next document is available | xi | edward@… |
| Description |
parse_document_end won't emit an event until it has seen the next token after the document end. This makes it difficult to use PyYAML to parse live streams of documents in a timely way, because the next document may not actually be available for some undetermined amount of time. Using PyYAML-3.04. |
|||
| #52 | fixed | importing gtk breaks unicode loading | xi | anonymous |
| Description |
The following summarizes it pretty well, I guess: >>> import yaml
>>> u = u"\N{skull and crossbones}"
>>> yaml.load(yaml.dump(u))
u'\u2620'
>>> import gtk
>>> yaml.load(yaml.dump(u))
'\xe2\x98\xa0'
|
|||
| #53 | fixed | Allow for immutable subclasses of YAMLObject | xi | toidinamai |
| Description |
YAMLObject are not directly instantiated so they don't need their own instance attribute (i.e. an own dict). Because of that they should define an empty slots and let subclasses decide whether they want arbitrary instance attributes or not: --- lib/yaml/__init__.py (revision 251)
+++ lib/yaml/__init__.py (working copy)
@@ -272,6 +272,9 @@
yaml_tag = None
yaml_flow_style = None
+ # no direct instantiation, so allow for immutable subclasses
+ __slots__ = ()
+
def from_yaml(cls, loader, node):
"""
Convert a representation node to a Python object.
The same is basically also true for YAMLObjectMetaclass but I doubt there is much use for this in practice. |
|||
