34 | | """ |
35 | | No newline at end of file |
| 34 | ### SortedDict ################################################################# |
| 35 | |
| 36 | >>> d = SortedDict() |
| 37 | >>> d['one'] = 'one' |
| 38 | >>> d['two'] = 'two' |
| 39 | >>> d['three'] = 'three' |
| 40 | >>> d['one'] |
| 41 | 'one' |
| 42 | >>> d['two'] |
| 43 | 'two' |
| 44 | >>> d['three'] |
| 45 | 'three' |
| 46 | >>> d.keys() |
| 47 | ['one', 'two', 'three'] |
| 48 | >>> d.values() |
| 49 | ['one', 'two', 'three'] |
| 50 | >>> d['one'] = 'not one' |
| 51 | >>> d['one'] |
| 52 | 'not one' |
| 53 | |
| 54 | ### DotExpandedDict ############################################################ |
| 55 | |
| 56 | >>> d = DotExpandedDict({'person.1.firstname': ['Simon'], 'person.1.lastname': ['Willison'], 'person.2.firstname': ['Adrian'], 'person.2.lastname': ['Holovaty']}) |
| 57 | >>> d['person']['1']['lastname'] |
| 58 | ['Willison'] |
| 59 | >>> d['person']['2']['lastname'] |
| 60 | ['Holovaty'] |
| 61 | >>> d['person']['2']['firstname'] |
| 62 | ['Adrian'] |
| 63 | """ |