coconut
coconut copied to clipboard
Simple, elegant, Pythonic functional programming.
The idea is to support [PEP 479](https://www.python.org/dev/peps/pep-0479/) on all versions (not just those which support `from __future__ import generator_stop`, which is the current behavior).
Coconut's `data` allows for arbitrary length constructor using the `*args` syntax, like a function, but don't allow for type hints in those. This will work: ```python def foo(*args: float): ```...
When Coconut has to do something that will obviously break type-checking (outside of the header) it should automatically add `type: ignore` comment.
A statement of the form ```python (a := b) ``` Currently requires a Python 3.8 target, but could be compiled to ```python a = b (a) ``` in order to...
I just replaced all instances of lambda functions like `() -> ...` by `-> ...` since it seems to be a possible shortcut, but broke my code out of the...
Especially given the presence of `concurrent_map`.
Should automatically add Coconut line numbers to Python line numbers in `--mypy` output.
Provides better error messages than not compiling the file at all, and allows for some degree of caching.
The code ``` func(head + [tail] match in list) ``` should be equivalent to ``` match [head] + tail in list: func(True) else: func(False) ``` with the exception that the...
I think we should have a proper linter/checker for coconut, something like `flake8` for pure Python. What do you think?