3 def __init__(self
, tag
, value
, start_mark
, end_mark
):
6 self
.start_mark
= start_mark
7 self
.end_mark
= end_mark
10 #if isinstance(value, list):
13 # elif len(value) == 1:
16 # value = '<%d items>' % len(value)
19 # value = repr(value[:70]+u' ... ')
23 return '%s(tag=%r, value=%s)' % (self
.__class
__.__name
__, self
.tag
, value
)
25 class ScalarNode(Node
):
27 def __init__(self
, tag
, value
,
28 start_mark
=None, end_mark
=None, style
=None):
31 self
.start_mark
= start_mark
32 self
.end_mark
= end_mark
35 class CollectionNode(Node
):
36 def __init__(self
, tag
, value
,
37 start_mark
=None, end_mark
=None, flow_style
=None):
40 self
.start_mark
= start_mark
41 self
.end_mark
= end_mark
42 self
.flow_style
= flow_style
44 class SequenceNode(CollectionNode
):
47 class MappingNode(CollectionNode
):