Skip to content

Parameters vs Arguments? #886

Closed
Closed

Description

@seisman

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

Activity

  1. weiji14 commented on Feb 14, 2021

    @weiji14
    Member

    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'.

  2. added
    documentation
    on Feb 14, 2021
  3. seisman commented on Feb 14, 2021

    @seisman
    MemberAuthor

    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.

  4. added
    help wanted
    on Feb 14, 2021
  5. maxrjones commented on Feb 14, 2021

    @maxrjones
    Member

    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'.

  6. seisman commented on Feb 25, 2021

    @seisman
    MemberAuthor

    Almost done. Closing the issue.

  7. added this to the 0.3.1 milestone on Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions