blob: 4dd25eb6e15b4af42dc32e80f5fb9fa6ccf5f92f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# test using an OrderedDict as the locals to construct a class
try:
from ucollections import OrderedDict
except ImportError:
try:
from collections import OrderedDict
except ImportError:
print("SKIP")
raise SystemExit
if not hasattr(int, "__dict__"):
print("SKIP")
raise SystemExit
A = type("A", (), OrderedDict(a=1, b=2, c=3, d=4, e=5))
print([k for k in A.__dict__.keys() if not k.startswith("_")])
|