view tests/data/conf_perf.py @ 504:4dbc16ff2670

.lstrip() seems to be a little bit faster than .rstrip() when testing whether quoting is needed
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 18 Dec 2021 02:35:42 +0100
parents 4f90e1eb7af8
children c2947ac74b0c
line wrap: on
line source

# -*- coding: utf-8 -*-

__all__ = ["key1", "key2", "tree1"]


try:
    from collections import OrderedDict
except ImportError:
    from ordereddict import OrderedDict
    

key1 = u"in the root namespace"
key2 = u"in the root namespace -- too"

tree1 = OrderedDict([
    (u'key3',  0x20),
    
    (u'tree2', OrderedDict([
        (u'key4', u"get this as `tree1.tree2.key4'"),
        (u'key5', True),
        (u'key6', u"off"),
        (u'key7', []),
        (u'key8', [
            u"val1",
            u"val2",
            u"{{key1}}"
        ]),
        (u'key9', OrderedDict()),
        (u'key10', u"1{{key1}}2{{key2}}{{key1}}3{{tree1.tree2.key4}}"),
        (u"key11", u"{{tree1.tree2.key6}}"),
    ]))])