Skip to content
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

readline(s), eachline: make chomp=true a keyword arg #20203

Merged
merged 3 commits into from
Jan 24, 2017

Conversation

StefanKarpinski
Copy link
Member

This is a continuation of @mpastell's excellent work in #19944.

@StefanKarpinski StefanKarpinski force-pushed the sk/chompreadline branch 2 times, most recently from 5492124 to 444327e Compare January 24, 2017 01:10
"""
function readline(filename::AbstractString; chomp::Bool=true)
open(filename) do f
readline(f, chomp=chomp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonstandard indent

@StefanKarpinski StefanKarpinski added this to the 0.6.0 milestone Jan 24, 2017
@StefanKarpinski StefanKarpinski added the io Involving the I/O subsystem: libuv, read, write, etc. label Jan 24, 2017
@StefanKarpinski StefanKarpinski changed the title readline(s), eachline: make chomp a keyword arg, default=true readline(s), eachline: make chomp=true a keyword arg Jan 24, 2017
@StefanKarpinski
Copy link
Member Author

Tests passed, then I noticed a problem constructing EachLine objects. Fixed and added tests.

@StefanKarpinski StefanKarpinski merged commit 7119419 into master Jan 24, 2017
@StefanKarpinski StefanKarpinski deleted the sk/chompreadline branch January 24, 2017 08:06
@nalimilan
Copy link
Member

Thanks @mpastell for persisting through the multiple revisions!

@mpastell
Copy link
Contributor

@nalimilan Thanks for the support and @StefanKarpinski thanks for finishing this! I have been extremely busy with my actual job the past week.

@StefanKarpinski
Copy link
Member Author

this reads a bit unclearly

I always take a pass through NEWS before a release to make sure everything is clear and included. Can fix this up then.

@mbauman mbauman added the breaking This change will break code label Jan 24, 2017
@StefanKarpinski
Copy link
Member Author

I have to say, that this is a really pleasant change. Hopefully it won't cause too much trouble, but I think this really is worth it – chomped lines is a much more useful default.

tkelman added a commit that referenced this pull request Jan 29, 2017
Fix readlines(::Cmd), was accidentally broken in #20203
tanmaykm referenced this pull request in dfdx/Spark.jl Jul 16, 2017
ChristianKurz added a commit to ChristianKurz/julia-vscode that referenced this pull request Jan 26, 2018
chomp is a keyword argument of readline now and defaults to `true`:
[julia #20203](JuliaLang/julia#20203)
@laborg laborg mentioned this pull request Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This change will break code io Involving the I/O subsystem: libuv, read, write, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants