Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absent of python 3.8 feature "assignment expression" #65

Open
JackAllTrades-MoN opened this issue Aug 1, 2021 · 1 comment
Open

Absent of python 3.8 feature "assignment expression" #65

JackAllTrades-MoN opened this issue Aug 1, 2021 · 1 comment

Comments

@JackAllTrades-MoN
Copy link

JackAllTrades-MoN commented Aug 1, 2021

Summary

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

Note

If you don't mind, I'll send a PR of this issue later. Please, check if it looks ok.

@bjpop
Copy link
Owner

bjpop commented Aug 2, 2021

Thanks @JackAllTrades-MoN.

PR would be appreciated. If possible, please include test cases as well.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants