From 262ba4469612e0a1ad8630da3d148d8bc3009334 Mon Sep 17 00:00:00 2001 From: Shivansh-007 Date: Mon, 12 Apr 2021 11:56:26 +0530 Subject: [PATCH] pkg(python-3.10.0a7): More pythonic 3.10.0a7 code --- packages/python/3.10.0a7/test.py | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/packages/python/3.10.0a7/test.py b/packages/python/3.10.0a7/test.py index f8bcd5c..c3135e2 100644 --- a/packages/python/3.10.0a7/test.py +++ b/packages/python/3.10.0a7/test.py @@ -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() \ No newline at end of file