stijn
7 years ago
committed by
Paul Sokolovsky
4 changed files with 50 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||
|
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())) |
Loading…
Reference in new issue