def __init__(self, tag, value, start_mark, end_mark):
self.start_mark = start_mark
#if isinstance(value, list):
# value = '<%d items>' % len(value)
# value = repr(value[:70]+u' ... ')
return '%s(tag=%r, value=%s)' % (self.__class__.__name__, self.tag, value)
def __init__(self, tag, value,
start_mark=None, end_mark=None, style=None):
self.start_mark = start_mark
class CollectionNode(Node):
def __init__(self, tag, value,
start_mark=None, end_mark=None, flow_style=None):
self.start_mark = start_mark
self.flow_style = flow_style
class SequenceNode(CollectionNode):
class MappingNode(CollectionNode):