Skip to content
Draft
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from os lazy import path
from os.path lazy import join
from .mod lazy import join
from ..mod lazy import join
from ...mod lazy import join
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
f(*x if c else y for x in z); a =
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# parse_options: {"target-version": "3.15"}
[*x if x else y]
{**x if x else y}
[x if x else *y]
{x if x else **y}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
(*x if c else y for x in z); a =
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# parse_options: {"target-version": "3.15"}
[**x for x in xs]
(**x for x in xs)
f(**x for x in xs)
{*x: y for x in xs}
{**x: y for x in xs}
{x: *y for x in xs}
{x: **y for x in xs}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# parse_options: {"target-version": "3.15"}
[**]
(**)
[**, x]
[** for x in z]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
f(*f(*x if c else y for x in xs) if d else z for z in zs); a =
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# parse_options: {"target-version": "3.15"}
[**(x if x else *y) for x in z]
(**(x if x else **y) for x in z)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# parse_options: {"target-version": "3.15"}
[**match]
[**case]
[**type]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
assert x = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
assert x = f'{1}\xZZ'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
assert False, x = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
assert x := 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
assert x = (1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# parse_options: {"target-version": "3.15"}
print(
"first"
"last"
x=1, "\xZZ")
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# parse_options: {"target-version": "3.15"}
print(
b"line1"
b"line2"
x=1
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# parse_options: {"target-version": "3.15"}
print(
f"line1"
f"line2"
x=1
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# parse_options: {"target-version": "3.15"}
print(
"line1"
"line2"
"line3"
x=1
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# parse_options: {"target-version": "3.15"}
print(
t"line1"
t"line2"
x=1
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# parse_options: {"target-version": "3.15"}
values = [
"first"
"last"
x=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# parse_options: {"target-version": "3.15"}
print(
"first"
"last"
x=1
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# parse_options: {"target-version": "3.15"}
print(
"é"
"한글"
x=1
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# parse_options: {"target-version": "3.15"}
value = f"""{0:
{1
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# parse_options: {"target-version": "3.15"}
value = f"""{
1
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# parse_options: {"target-version": "3.15"}
match x:
case {**rest, 1: value}:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
from os.path lazy import join
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# parse_options: {"target-version": "3.15"}
case 1:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# parse_options: {"target-version": "3.15"}
case 1:
raise from None
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# parse_options: {"target-version": "3.15"}
case {_.x: value}:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# parse_options: {"target-version": "3.15"}
case 1:
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# parse_options: {"target-version": "3.15"}
case 1:
f(*x if c else y for x in z); a =
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# parse_options: {"target-version": "3.15"}
value = t"""{
1
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# parse_options: {"target-version": "3.15"}
{**(x if c else y) for x in xs}
{**(x or y) for x in xs}
{**(x < y) for x in xs}
{**(lambda: x) for x in xs}
(*(x if c else y) for x in xs)
(*(x or y) for x in xs)
(*(x < y) for x in xs)
(*(lambda: x) for x in xs)
f(*x if c else y for x in xs)
f(*x if c else y)
(*(*(x or y) for x in z) for z in zs)
async def unpack(xs):
return {**(x if c else y) async for x in xs}
async def iterate(xs):
return (*(x if c else y) async for x in xs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# parse_options: {"target-version": "3.15"}
match x:
case {_.x: value}:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# parse_options: {"target-version": "3.15"}
assert (x := 1)
assert True, (message := 2)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# parse_options: {"target-version": "3.15"}
def case(x):
return x
def match(x):
return x
case(1)
match(1)
Loading