-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added interior scopes to python (#2814)
ci fails because of: nodejs/corepack#612 ## Release notes You can now use `"inside"` in Python loops and conditionals (`if`, `for`/`while`, `try`, etc).
- Loading branch information
1 parent
6c12bc3
commit 8a81abe
Showing
14 changed files
with
355 additions
and
35 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
if True: | ||
a | ||
elif False: | ||
b | ||
else: | ||
c | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Removal] = 1:4-1:5 | ||
>-< | ||
1| a | ||
|
||
[#1 Domain] = 0:0-1:5 | ||
>-------- | ||
0| if True: | ||
1| a | ||
-----< | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Removal] = 3:4-3:5 | ||
>-< | ||
3| b | ||
|
||
[#2 Domain] = 2:0-3:5 | ||
>----------- | ||
2| elif False: | ||
3| b | ||
-----< | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Removal] = 5:4-5:5 | ||
>-< | ||
5| c | ||
|
||
[#3 Domain] = 4:0-5:5 | ||
>----- | ||
4| else: | ||
5| c | ||
-----< | ||
|
||
[#3 Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
for v in values: | ||
pass | ||
--- | ||
|
||
[Content] = | ||
[Removal] = 1:4-1:8 | ||
>----< | ||
1| pass | ||
|
||
[Domain] = 0:0-1:8 | ||
>---------------- | ||
0| for v in values: | ||
1| pass | ||
--------< | ||
|
||
[Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
while True: | ||
pass | ||
--- | ||
|
||
[Content] = | ||
[Removal] = 1:4-1:8 | ||
>----< | ||
1| pass | ||
|
||
[Domain] = 0:0-1:8 | ||
>----------- | ||
0| while True: | ||
1| pass | ||
--------< | ||
|
||
[Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
match value: | ||
case 1: | ||
a | ||
case _: | ||
b | ||
--- | ||
|
||
[#1 Content] = 1:4-4:9 | ||
>------- | ||
1| case 1: | ||
2| a | ||
3| case _: | ||
4| b | ||
---------< | ||
|
||
[#1 Removal] = 0:12-4:9 | ||
> | ||
0| match value: | ||
1| case 1: | ||
2| a | ||
3| case _: | ||
4| b | ||
---------< | ||
|
||
[#1 Domain] = 0:0-4:9 | ||
>------------ | ||
0| match value: | ||
1| case 1: | ||
2| a | ||
3| case _: | ||
4| b | ||
---------< | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Removal] = 2:8-2:9 | ||
>-< | ||
2| a | ||
|
||
[#2 Domain] = 1:4-2:9 | ||
>------- | ||
1| case 1: | ||
2| a | ||
---------< | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Removal] = 4:8-4:9 | ||
>-< | ||
4| b | ||
|
||
[#3 Domain] = 3:4-4:9 | ||
>------- | ||
3| case _: | ||
4| b | ||
---------< | ||
|
||
[#3 Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
1 if True else 0 | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Removal] = | ||
[#1 Domain] = 0:0-0:1 | ||
>-< | ||
0| 1 if True else 0 | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Removal] = 0:5-0:9 | ||
>----< | ||
0| 1 if True else 0 | ||
|
||
[#2 Domain] = 0:2-0:9 | ||
>-------< | ||
0| 1 if True else 0 | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Removal] = 0:15-0:16 | ||
>-< | ||
0| 1 if True else 0 | ||
|
||
[#3 Domain] = 0:10-0:16 | ||
>------< | ||
0| 1 if True else 0 | ||
|
||
[#3 Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
try: | ||
a | ||
except: | ||
b | ||
finally: | ||
c | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Removal] = 1:4-1:5 | ||
>-< | ||
1| a | ||
|
||
[#1 Domain] = 0:0-1:5 | ||
>---- | ||
0| try: | ||
1| a | ||
-----< | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Removal] = 3:4-3:5 | ||
>-< | ||
3| b | ||
|
||
[#2 Domain] = 2:0-3:5 | ||
>------- | ||
2| except: | ||
3| b | ||
-----< | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Removal] = 5:4-5:5 | ||
>-< | ||
5| c | ||
|
||
[#3 Domain] = 4:0-5:5 | ||
>-------- | ||
4| finally: | ||
5| c | ||
-----< | ||
|
||
[#3 Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
try: | ||
a | ||
except*: | ||
b | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Removal] = 1:4-1:5 | ||
>-< | ||
1| a | ||
|
||
[#1 Domain] = 0:0-1:5 | ||
>---- | ||
0| try: | ||
1| a | ||
-----< | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Removal] = 3:4-3:5 | ||
>-< | ||
3| b | ||
|
||
[#2 Domain] = 2:0-3:5 | ||
>-------- | ||
2| except*: | ||
3| b | ||
-----< | ||
|
||
[#2 Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
with file: | ||
pass | ||
--- | ||
|
||
[Content] = | ||
[Removal] = 1:4-1:8 | ||
>----< | ||
1| pass | ||
|
||
[Domain] = 0:0-1:8 | ||
>---------- | ||
0| with file: | ||
1| pass | ||
--------< | ||
|
||
[Insertion delimiter] = " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.