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

Infer types based on argument names? #9

Open
jdonaldson opened this issue Jun 27, 2018 · 0 comments
Open

Infer types based on argument names? #9

jdonaldson opened this issue Jun 27, 2018 · 0 comments

Comments

@jdonaldson
Copy link

Really glad to stumble across this library! I'm just thinking out loud here, wanted to start a discussion.

I'm realizing that in most dynamic language libraries, the argument name winds up acting like a type of some sort. E.g. an arg of "name" is always a string type in my experience. It might be possible to define some simple rules for defining named argument types on a per-extern basis.

Some examples:

pandas : arguments with name "axis" are always Integer, "skipna" is Boolean, etc.
seaborn : "data" is usually a pandas dataframe or an ndarray type.
scipy : "border_value" is usually an integer (0)

Also, should it be possible to extract all of the base level object methods into some other extendable extern definition? It would really reduce a lot of duplication. I'm talking about init, and operators like le, etc.

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

No branches or pull requests

1 participant