diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/target/python.lux | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 0f25e6eb2..1b5ecd2ee 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -8,7 +8,7 @@ [hash {"+" Hash}] ["[0]" enum]] [control - [pipe {"+" new> case> cond>}] + ["[0]" pipe] [parser ["<[0]>" code]]] [data @@ -132,8 +132,9 @@ (def: .public bool (-> Bit Literal) - (|>> (case> #0 "False" - #1 "True") + (|>> (pipe.case + #0 "False" + #1 "True") :abstraction)) (def: .public int @@ -146,17 +147,17 @@ (def: .public float (-> Frac Literal) - (`` (|>> (cond> (~~ (template [<test> <python>] - [[<test>] - [(new> (format "float(" text.double_quote <python> text.double_quote ")") [])]] - - [(f.= f.positive_infinity) "inf"] - [(f.= f.negative_infinity) "-inf"] - [f.not_a_number? "nan"] - )) - - ... else - [%.frac]) + (`` (|>> (pipe.cond (~~ (template [<test> <python>] + [[<test>] + [(pipe.new (format "float(" text.double_quote <python> text.double_quote ")") [])]] + + [(f.= f.positive_infinity) "inf"] + [(f.= f.negative_infinity) "-inf"] + [f.not_a_number? "nan"] + )) + + ... else + [%.frac]) :abstraction))) (def: safe |