You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
384 B
21 lines
384 B
7 years ago
|
try:
|
||
|
try:
|
||
|
from collections import namedtuple
|
||
|
except ImportError:
|
||
|
from ucollections import namedtuple
|
||
|
except ImportError:
|
||
|
print("SKIP")
|
||
|
raise SystemExit
|
||
|
|
||
|
t = namedtuple("Tup", ["baz", "foo", "bar"])(3, 2, 5)
|
||
|
|
||
|
try:
|
||
|
t._asdict
|
||
|
except AttributeError:
|
||
|
print("SKIP")
|
||
|
raise SystemExit
|
||
|
|
||
|
d = t._asdict()
|
||
|
print(list(d.keys()))
|
||
|
print(list(d.values()))
|