Open JackAllTrades-MoN opened 3 years ago
Assignment expression (https://www.python.org/dev/peps/pep-0572/) is not yet available on language-python.
result on ghci
*PyParser> import qualified Language.Python.Version3.Parser as PyParser *PyParser> PyParser.parseExpr "print(x := 2)" "" Left (UnexpectedToken (ColonToken {token_span = SpanPoint {span_filename = "", span_row = 1, span_column = 9}}))
example on python3.8
>>> print(x := 2) 2
If you don't mind, I'll send a PR of this issue later. Please, check if it looks ok.
Thanks @JackAllTrades-MoN.
PR would be appreciated. If possible, please include test cases as well.
Cheers!
Summary
Assignment expression (https://www.python.org/dev/peps/pep-0572/) is not yet available on language-python.
result on ghci
example on python3.8
Note
If you don't mind, I'll send a PR of this issue later. Please, check if it looks ok.