File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ Customize python syntax with [LangTrans](https://github.com/LangTrans/LangTrans)
33## Customized Syntax
44``` js
55p" Hello World"
6- add = (x ) => x+ 1
7- print| add| add (1 )
8- try add (" 1" ) Exception print (" Error:" ,err)
6+ inc = (x ) => x+ 1
7+ add (x,y)=> x+ y
8+ print (! [inc => 1..6 ])
9+ print| inc| inc (1 )
10+ try inc (" 1" ) Exception print (" Error:" ,err)
911test = " test"
1012= test .replace (" test" ," " )
1113x = True
@@ -15,13 +17,14 @@ print("Done") if x
1517## Orginal Syntax
1618``` python
1719print (" Hello World" )
18- add = lambda x : x+ 1
19- print (add(add(1 )))
20+ inc = lambda x : x+ 1
21+ add = lambda x ,y :x+ y
22+ print (list (map (inc,range (1 ,6 + 1 ))))
23+ print (inc(inc(1 )))
2024try :
21- add (" 1" )
25+ inc (" 1" )
2226except Exception as err:
2327 print (" Error:" ,err)
24-
2528test = " test"
2629test= test.replace(" test" ," " )
2730x = True
You can’t perform that action at this time.
0 commit comments