FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/tests/tuple1.py at main · sak-codes/lpython · GitHub
sak-codes
/
lpython
Public
forked from
lcompilers/lpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
tests
/
tuple1.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (28 loc) · 757 Bytes
Breadcrumbs
lpython
/
tests
/
tuple1.py
Copy path
File metadata and controls
35 lines (28 loc) · 757 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from
ltypes
import
i32
,
f32
def
test_Tuple
():
a1
:
tuple
[
i32
,
i32
,
i32
]
a1
=
(
1
,
2
,
3
)
a1
=
(
-
3
,
-
2
,
-
1
)
a2
:
tuple
[
str
,
str
,
str
]
a2
=
(
"a"
,
"b"
,
"c"
)
a3
:
tuple
[
i32
,
i32
,
f32
,
str
]
float_mem
:
f32
float_mem
=
f32
(
0.45
)
a3
=
(
-
2
,
-
1
,
float_mem
,
"d"
)
a4
:
tuple
[
tuple
[
i32
,
i32
,
i32
],
tuple
[
i32
,
i32
,
i32
]]
a4
=
((
1
,
2
,
3
), (
4
,
5
,
6
))
a5
:
tuple
[
tuple
[
str
,
str
,
f32
],
tuple
[
str
,
i32
,
f32
]]
float_mem1
:
f32
float_mem2
:
f32
float_mem1
=
f32
(
3.4
)
float_mem2
=
f32
(
5.6
)
a5
=
((
"a"
,
"b"
,
float_mem1
), (
"c"
,
3
,
float_mem2
))
b0
:
i32
b1
:
i32
b0
=
a1
[
0
]
b0
,
b1
=
a1
[
2
],
a1
[
1
]
a11
:
tuple
[
i32
,
i32
]
b11
:
tuple
[
i32
,
i32
]
a11
=
(
1
,
2
)
b11
=
(
1
,
2
)
assert
a11
==
b11
Back
|
FazBrowse Home
|
New Git URL