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

Parameters vs Arguments? #886

Closed
seisman opened this issue Feb 14, 2021 · 4 comments
Closed

Parameters vs Arguments? #886

seisman opened this issue Feb 14, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation help wanted Helping hands are appreciated
Milestone

Comments

@seisman
Copy link
Member

seisman commented Feb 14, 2021

For function parameters like frame, region, we're inconsistently calling them "parameters", "arguments", or "options".

I thought the correct way is calling frame an "argument", but after reading this FAQ (https://docs.python.org/3.9/faq/programming.html#faq-argument-vs-parameter), I think we should call frame a "parameter".

Thoughts? @GenericMappingTools/python @GenericMappingTools/python-maintainers

@weiji14
Copy link
Member

weiji14 commented Feb 14, 2021

A quick CTRL+F yielded >100 instances of 'argument' in the PyGMT project currently. Some are correctly called 'argument', but not all of them. It will be a big task to replace all of them, so maybe just be careful going forward and replace things on an ad-hoc basis (e.g. when refactoring stuff). I think most people won't get too hung up on whether we call it 'parameter' or 'argument', they know that it is 'something' handled by the program.

As for 'option', I think it's fine to use as a synonym for 'parameter'.

@weiji14 weiji14 added the documentation Improvements or additions to documentation label Feb 14, 2021
@seisman
Copy link
Member Author

seisman commented Feb 14, 2021

It will be a big task to replace all of them, so maybe just be careful going forward and replace things on an ad-hoc basis (e.g. when refactoring stuff).

Yes, I agree. It would be better to document it in the contributing guides.

@seisman seisman added the help wanted Helping hands are appreciated label Feb 14, 2021
@maxrjones
Copy link
Member

maxrjones commented Feb 14, 2021

In #881, I found that another common inconsistency involved referencing the arguments of parameters as options. Based on this discussion, it seems that these should be only referred to as 'arguments' if 'option' is a synonym for 'parameter'.

@seisman
Copy link
Member Author

seisman commented Feb 25, 2021

Almost done. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Helping hands are appreciated
Projects
None yet
Development

No branches or pull requests

3 participants