File: testsubclass.py

package info (click to toggle)
python-ruamel.ordereddict 0.4.9-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 376 kB
  • sloc: ansic: 3,678; python: 1,530; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

import sys

if len(sys.argv) > 1:
    from _ordereddict import sorteddict as SD
else:
    from _ordereddict import sorteddict
    class SD(sorteddict):
        def __init__(self, *argc, **kw):
            sorteddict.__init__(self, *argc, **kw)

s = SD({0: 'foo', 2: 'bar'})
print s
print repr(s)
print s.items()
s[1] = 'bla'
print s.items()