forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to multiple property pairs in sprint (JuliaLang#39381)
* Add support to multiple property pairs in sprint Sometimes it is required to pass multiple properties to `IOContext` in `sprint`. For example, if we want to print with `:compact` and `:limit` set to true. Currently, the only possible way to do this is creating an `IOContext` using a dummy `IOBuffer` with those parameters. Hence, this commit allows to pass a vector of pairs `:key=>value` to `context` keyword of `sprint` so that we can easily set multiple properties. This is not a breaking change, and no performance regression was identified when using the previous function signatures. * Add compat annotation to sprint * Update base/strings/io.jl Co-authored-by: Rafael Fourquet <[email protected]> * Update sprint docstring * Update NEWS.md * Move NEWS.md entry to the correct place Co-authored-by: Rafael Fourquet <[email protected]>
- Loading branch information
1 parent
bb2d5ea
commit 9c6f76e
Showing
3 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
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
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
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