PHP 8.2.30
Preview: nodes.py Size: 1.41 KB
/opt/hc_python/lib/python3.12/site-packages/yaml/nodes.py

class Node(object):
    def __init__(self, tag, value, start_mark, end_mark):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark
    def __repr__(self):
        value = self.value
        #if isinstance(value, list):
        #    if len(value) == 0:
        #        value = '<empty>'
        #    elif len(value) == 1:
        #        value = '<1 item>'
        #    else:
        #        value = '<%d items>' % len(value)
        #else:
        #    if len(value) > 75:
        #        value = repr(value[:70]+u' ... ')
        #    else:
        #        value = repr(value)
        value = repr(value)
        return '%s(tag=%r, value=%s)' % (self.__class__.__name__, self.tag, value)

class ScalarNode(Node):
    id = 'scalar'
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, style=None):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark
        self.style = style

class CollectionNode(Node):
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, flow_style=None):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark
        self.flow_style = flow_style

class SequenceNode(CollectionNode):
    id = 'sequence'

class MappingNode(CollectionNode):
    id = 'mapping'

Directory Contents

Dirs: 1 × Files: 18

Name Size Perms Modified Actions
- drwxr-xr-x 2025-04-04 08:01:58
Edit Download
4.77 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
27.97 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
3.76 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
2.77 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
42.00 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
2.47 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
2.39 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
2.01 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
1.41 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
24.90 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
6.63 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
13.86 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
8.79 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
50.08 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
4.07 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
2.51 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download
2.37 MB lrwxr-xr-x 2025-04-04 08:01:58
Edit Download
12.02 KB lrw-r--r-- 2025-04-04 08:01:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).