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

Keywords unlocked 2 #25683

Closed
wants to merge 6 commits into from
Closed

Keywords unlocked 2 #25683

wants to merge 6 commits into from

Conversation

bramtayl
Copy link
Contributor

@bramtayl bramtayl commented Jan 22, 2018

Continuation of #25647, with keyword arguments which needed renaming as suggested here #25188. I chose ncores instead of cores following the discussion in #25659.

@@ -580,22 +580,22 @@ end

# `methodswith` -- shows a list of methods using the type given
"""
methodswith(typ[, module or function][, showparents::Bool=false])
methodswith(typ[, module or function]; parents::Bool=false])
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be called supertypes, following e.g. the supertype function.

@@ -667,7 +667,7 @@ function findminmax!(f, Rval, Rind, A::AbstractArray{T,N}) where {T,N}
end

"""
findmin!(rval, rind, A, [init=true]) -> (minval, index)
findmin!(rval, rind, A) -> (minval, index)
Copy link
Member

Choose a reason for hiding this comment

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

The init argument exists. I guess you intended to use ; to show it's a keyword argument? Same below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I did this on purpose. #25188 (comment) where Stefan speculated init was a private keyword.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I had missed that. I'd remove the argument completely then, given that it doesn't seem to be used internally.

FWIW, sortperm! has an initialized=false argument which is somewhat similar (but reversed).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like init traces back to #6894. @timholy is there any reason to keep init?

@@ -672,7 +672,7 @@ function signature_type(@nospecialize(f), @nospecialize(args))
end

"""
code_lowered(f, types, expand_generated = true)
code_lowered(f, types; expand_generated = true)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this one could just be generated? That would parallel if @generated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I commented about this here: #25188 (comment). I'm not too passionate though so if people feel like generated makes sense I can change it.

@JeffBezanson
Copy link
Member

I'll fix this up.

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.

3 participants