-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Release v2.2.0 #713
Merged
Release v2.2.0 #713
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Coconut's documentation for more information on all of the features listed below.
Major changes:
multiset
built-in and literals #694: Newmultiset
built-in based oncollections.Counter
, including new multiset literal syntax (m{1, 1, 2, 3, 3, 4}
).safe_call
,Expected
, renameof
tocall
#691: NewExpected
built-in based on Haskell'sEither
, plus newsafe_call
built-in that calls a function while collecting any errors into anExpected
. Additionally, theof
built-in has been renamed tocall
(of
is still available as a deprecated alias when compiled without--strict
).windowsof
built-in #701: Newwindowsof
built-in for iterating over sliding windows of the given iterable.cartesian_product
built-in #688: Newcartesian_product
built-in as an enhanced version ofitertools.product
includingnumpy
support.cycle
built-in based onitertools.cycle
#690: Newcycle
built-in as an enhanced version ofitertools.cycle
.strict
tomap
/parallel_map
/concurrent_map
, addlevels
toflatten
#704, Addfillvalue
support togroupsof
#703,addpattern
should accept any number of functions #702,memoize
should accept a function as the first argument #693,fmap
ofNone
should beNone
#692: Lots of improvements to existing built-ins:map
now supports astrict=True
keyword-only argument that works as inzip
.flatten
now supports alevels
argument for how many levels to flatten.groupsof
now supports afillvalue
argument to pad the last group.addpattern
now accepts any number of pattern-matching functions.memoize
now accepts a function to memoize as the first argument.None
-aware function composition pipes #710: NewNone
-aware function composition pipes (e.g.f ..?> g
).Minor changes:
<:
instead of:
or<=
#686: Type parameter bounds can (and should) now use<:
syntax instead of:
or<=
(e.g.def f[T <: int[])(xs: T) -> T = ...
).None
-aware pipes #711: BackwardsNone
-aware pipes now supported (e.g.<?|
).data
constructor defaults in pattern-matching #708: Pattern-matching againstdata
types with default arguments now allows those defaults to be elided in thematch
.::
now produces a reiterable object when called on reiterable objects.MatchError
s from different Coconut packages should play nicely #706: Multiple Coconut projects should now be able to seamlessly use each other'sMatchError
s when compiled in--package
mode.__bool__
magic method fixed on Python 2.--no-wrap
.--strict
warn about overriding built-in names #684: Improved detection of code issues on and off--strict
.fmap
typing #698: Typing forfmap
has been improved.numpy
support toall_equal
and other built-ins #689: Improvednumpy
support for some built-ins.weakref
able.