coconut icon indicating copy to clipboard operation
coconut copied to clipboard

Simple, elegant, Pythonic functional programming.

Results 95 coconut issues
Sort by recently updated
recently updated
newest added

See https://ocharles.org.uk/blog/posts/2014-12-04-record-wildcards.html Example use case: ``` data Mydata(foo, bar) foo = 1 bar = 2 new_data = Mydata({..}) ``` Very useful for huge data structure that are e.g. tied to...

feature

This is a bit of a nitpick, but in the interest of total python compatibility: When the following code is run in the coconut interpreter it fails: ``` import pickle...

modification

It is currently not possible to execute cell from .coco file in VS Code. A cell is defined by: ``` # %% "hello" |> print # %% ```

good first issue
tooling

Should add a `map_using` keyword argument to `starmap` and use it to add `starmap.using_processes` and `starmap.using_threads`. We should also probably set ``` map.using_processes = process_map map.using_threads = thread_map ``` and...

feature

If we introduced parsing individually for each `lineitem`, we could very easily cache and reuse prefix parses by storing the full compiler state after the lineitem. Would require adjusting `loc`s.

performance
partially resolved

Current Coconut syntax: https://coconut.readthedocs.io/en/latest/DOCS.html#keyword-argument-name-elision Discussion of possible new Python syntax: https://discuss.python.org/t/syntactic-sugar-to-encourage-use-of-named-arguments/36217/131 Coconut syntax should be deprecated in favor of whatever Python adopts.

modification

Statement lambdas should automatically get partially applied with the surrounding scope, even that introduced by a list comprehension or normal lambda. Easy way to do this is try to inject...

modification

- [x] Use pygments to highlight code in error messages. - [x] Cut long code snippets in the middle. - [ ] Use fancy formatting for kernel errors.

modification
partially resolved

Should look up the module for import, compile it, then run `python -m` to execute it. Should be incompatible with `-r` or `-i`. Should also work for `coconut-run` and should...

feature

Should compile `def f(**kwargs: **D): ...` to `def f(**kwargs: typing.Unpack[D]): ...`.

feature