coconut
coconut copied to clipboard
Simple, elegant, Pythonic functional programming.
Python document says there is [unary plus operator](https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations) in python. It's equivalent to `operator.pos`, and it's function can be overrided by implementing magic method `__pos__`. While it's hard to find...
Should automatically compile `typing` imports into `typing_extensions` imports depending on target.
Should compile ``` class Array(Generic[*Shape]): ... ``` to the equivalent of ``` from typing_extensions import Unpack class Array(Generic[Unpack[Shape]]): ... ```
A lot of config information doesn't justify a full blown class, but Python dicts can be hard on my eyes and right pinky because arbitrary keys must be enclosed in...
Sometimes you have a bunch of small classes that don't justify all the trouble of writing `class` a hundred times. The same could be said for subclasses or a class...
# Are there plans to add support for labeled `for`, `while`, `break`, and `continue` statements? ## Reasons This feature is primarily intended for correctness' sake, but also convenience. **Correctness**: Say...
Should use `curry`/`uncurry` from [`coconut-prelude`](https://github.com/evhub/coconut-prelude) but with better verification that the caught `TypeError`/`MatchError` actually is from a failed function signature.
The unicode alternatives of the operators are brilliant. But is there any way that I can define my own one? For example, I'm writing a function that checks whether a...
Thanks to Microsoft's language server protocol there are tons of opensource implementation of [LSP ](https://langserver.org/) in other languages (there are even two implementations for python). I would like to start...
Should pass through rather than `.suppress()`ing `newline`s. Can allow `newline.suppress()` if the handler adds a `.wrap_loc(...)` to the end and a comment is added to the `newline.suppress()` location stating such.