Usage of the terms "parameter" and "argument"

Open
#3,341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, python
Domain
api

Research direction

Reproduce the reported dt.fread(sep=1) case and search the error-generation code for the shown Argument sep message. Check related validation errors for the same terminology, then verify that the resulting messages consistently use Parameter for function declarations.

Written by the indexing model from the issue text.

Description

We seem to misuse the terms "parameter" and "argument" when generate error messages. They're not synonyms and have pretty clear definitions:

  • a parameter is a variable in the declaration of a function;
  • an argument is the actual value of this variable that gets passed to the function.

For instance, the code

>>> from datatable import dt
>>> dt.fread(sep=1)
TypeError: Argument sep in function datatable.fread() should be a string, instead got <class 'int'>

should really print

TypeError: Parameter sep in function datatable.fread() should be a string, instead got <class 'int'>
Dominant language
C++
Stars
1.9k
Forks
164
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from h2oai/datatable

All issues in h2oai/datatable

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.