-
-
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 v3.0.0 #735
Merged
Release v3.0.0 #735
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.
Coconut v3! See Coconut's documentation for more information on all of the features listed below.
Note that v3 is a major version release that comes with some breaking changes, though Coconut will do its best to warn you if your code does anything that changed from v2 to v3.
Breaking changes:
set
patterns now work likedict
patterns where they allow extra keys, such that{1, 2}
will match{1, 2, 3}
. To get back the strict behavior, use the{1, 2, 3, *()}
pattern. Coconut will warn you if your code contains set patterns without an explicit strictness marker.f x**2
is now equivalent tof(x**2)
rather thanf(x)**2
. Coconut will warn you if your code contains expressions with new precedence..$[]
only use__iter_getitem__
, not__getitem__
#733:.$[]
will now only default to using an existing__getitem__
if the object is registered as acollections.abc.Sequence
.__iter_getitem__
will still always be used. Lets you do things like{"k": "v"}$[0]
.getattr
partials #730:obj.
syntax as a shorthand forgetattr$(obj)
deprecated.--jobs
default tosys
rather than0
#732:--jobs
now defaults tosys
rather than0
.New features:
a x**2 + b x + c
, with support for single variable names and numeric constants as coefficients.copyclosure def
functions that copy their closures on function creation, allowing them to e.g. hold on to loop variables.(+)
syntax in a typing context now yields atyping.Protocol
that requires supporting that operator.&:
operator for combining multipletyping.Protocol
's into a single protocol.addpattern def
with no priormatch def
#718 (thanks @yggdr!): You can now useaddpattern def
even if there's no existing function of that name, allowing you to useaddpattern def
for every pattern rather than having to usematch def
for the first one.await
#727: Newx |> await
syntax for usingawait
in pipes.pandas
support #734: Substantially improvedpandas
support.frozenset
andmultiset
patterns.Bugfixes:
in
operator in pattern matching code #725 (thanks @yggdr!): Fixed(in)
operator function argument ordering.is not
andnot in
operator functions now supported.xonsh
loading and fixedxontrib unload coconut
.xonsh
commands when using Coconut'sxonsh
plugin.dict
now always functions as on the latest Python 3 on any Python version.super
compatibility across Python versions and some cases wheresuper()
wouldn't work.coconut --jupyter qtconsole
.