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

open: change core open method to keywords instead of positionals. #3558

Closed
wants to merge 1 commit into from

Conversation

StefanKarpinski
Copy link
Sponsor Member

Closes #3556.

@ViralBShah
Copy link
Member

Much nicer API!

@StefanKarpinski
Copy link
Sponsor Member Author

Hmm. I'm not entirely sure. The thing that bothers me is the default of the read keyword being true while all the others default to false. It feels really inconsistent. But I can't think of a better way to do it.

@JeffBezanson
Copy link
Sponsor Member

Stefan and I discussed that the definition we'd need is

function open(file; write=false, read=!write)

which keyword args don't officially support but probably could.

@StefanKarpinski
Copy link
Sponsor Member Author

So we're not doing this? I think it would be better if we had the ability to define read=!write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use keywords for open?
3 participants