walrus-compiler

Back-port compiler for Python 3.8 assignment expressions.


Keywords
walrus, operator, assignment, expression, back-port, compiler, backport, pybpc
License
Apache-2.0
Install
pip install walrus-compiler==0.0.0.dev0

Documentation

NB: walrus is currently under reconstruction. It is highly recommended to directly install from the git repo or the pre-release distributions.


walrus

PyPI - Downloads PyPI - Version PyPI - Python Version

GitHub Actions - Status Codecov - Coverage Documentation Status

Write assignment expressions in Python 3.8 flavour, and let walrus worry about back-port issues 🍺

  Since PEP 572, Python introduced assignment expressions syntax in version 3.8. For those who wish to use assignment expressions in their code, walrus provides an intelligent, yet imperfect, solution of a backport compiler by replacing assignment expressions syntax with old-fashioned syntax, which guarantees you to always write assignment expressions in Python 3.8 flavour then compile for compatibility later.

Documentation

  See documentation for usage and more details.

Contribution

  Contributions are very welcome, especially fixing bugs and providing test cases. Note that code must remain valid and reasonable.

See Also