Linaro Git Browser
Code Review
Sign In
review.linaro.org
/
lite
/
micropython
/
686afc5c0aaf2bc5a8d2547b703ab3177e0ea569
/
.
/
tests
/
basics
/
dict-from-iter.py
blob: dc76801ff677190b6b39d145fbbfdf507ba5c4df [
file
] [
log
] [
blame
]
print
(
dict
([(
1
,
"foo"
)]))
d
=
dict
([(
"foo"
,
"foo2"
),
(
"bar"
,
"baz"
)])
print
(
sorted
(
d
.
keys
()))
print
(
sorted
(
d
.
values
()))
try
:
dict
(((
1
,),))
except
ValueError
:
print
(
"ValueError"
)
try
:
dict
(((
1
,
2
,
3
),))
except
ValueError
:
print
(
"ValueError"
)