mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-24 14:06:27 +02:00
pkg(python-3.10.0a7): More pythonic 3.10.0a7 code
This commit is contained in:
parent
17f4af32fd
commit
262ba44696
1 changed files with 6 additions and 17 deletions
|
@ -1,18 +1,7 @@
|
|||
execute = (execute_with := lambda *a, **k: lambda f: f(*a, **k))()
|
||||
working = True
|
||||
|
||||
|
||||
@int
|
||||
@execute
|
||||
class n: __int__ = lambda _: 69
|
||||
|
||||
|
||||
@execute
|
||||
class cout: __lshift__ = print
|
||||
|
||||
|
||||
@execute_with(n)
|
||||
def output(n):
|
||||
return "OK"
|
||||
|
||||
|
||||
cout << output
|
||||
match working:
|
||||
case True:
|
||||
print("OK")
|
||||
case False:
|
||||
print()
|
Loading…
Add table
Add a link
Reference in a new issue