Mercurial > hgrepos > Python > libs > ConfigMix
annotate tests/data/conf10.py @ 513:599e8ade567c
str.join(): use a list comprehension instead of a generator expression for performance reasons
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 19 Dec 2021 10:38:20 +0100 |
| parents | d22985d6806e |
| children |
| rev | line source |
|---|---|
|
97
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
1 # -*- coding: utf-8 -*- |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
2 |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
3 key1 = u"in the root namespace" |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
4 key2 = u"in the root namespace -- too" |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
5 |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
6 tree1 = { |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
7 'key3': 0x20, |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
8 |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
9 'tree2': { |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
10 'key4': u"get this as `tree1.tree2.key4'", |
|
412
816327e178b0
Provide coercing methods for the jailed configuration: getintXXX(), getboolXXX(), getfloatXXX() and friends.
Franz Glasner <fzglas.hg@dom66.de>
parents:
97
diff
changeset
|
11 'key5': True, |
|
459
9dc9cef1b9cd
Implement proper iteration support for jailed configurations
Franz Glasner <fzglas.hg@dom66.de>
parents:
412
diff
changeset
|
12 'key6': u"off", |
|
9dc9cef1b9cd
Implement proper iteration support for jailed configurations
Franz Glasner <fzglas.hg@dom66.de>
parents:
412
diff
changeset
|
13 'key7': [], |
|
9dc9cef1b9cd
Implement proper iteration support for jailed configurations
Franz Glasner <fzglas.hg@dom66.de>
parents:
412
diff
changeset
|
14 'key8': [ |
|
9dc9cef1b9cd
Implement proper iteration support for jailed configurations
Franz Glasner <fzglas.hg@dom66.de>
parents:
412
diff
changeset
|
15 u"val1", |
|
9dc9cef1b9cd
Implement proper iteration support for jailed configurations
Franz Glasner <fzglas.hg@dom66.de>
parents:
412
diff
changeset
|
16 u"val2", |
|
9dc9cef1b9cd
Implement proper iteration support for jailed configurations
Franz Glasner <fzglas.hg@dom66.de>
parents:
412
diff
changeset
|
17 u"{{key1}}" |
|
460
d22985d6806e
Proper boolean context for jailed configurations: __bool__()/__nonzero__()
Franz Glasner <fzglas.hg@dom66.de>
parents:
459
diff
changeset
|
18 ], |
|
d22985d6806e
Proper boolean context for jailed configurations: __bool__()/__nonzero__()
Franz Glasner <fzglas.hg@dom66.de>
parents:
459
diff
changeset
|
19 'key9': {} |
|
97
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
20 } |
|
1b4d95f60650
Build a tree-ish configuration from an INI style configuration file
Franz Glasner <hg@dom66.de>
parents:
diff
changeset
|
21 } |
