Skip to content

Python: Use of kwargs for API functions#1737

Merged
Lestropie merged 2 commits intodevfrom
python_kwargs
Oct 3, 2019
Merged

Python: Use of kwargs for API functions#1737
Lestropie merged 2 commits intodevfrom
python_kwargs

Conversation

@Lestropie
Copy link
Copy Markdown
Member

Only two remaining functions within the Python API where it was considered more appropriate to use keyword arguments rather than ordered arguments. Was raised in #1736, but is ultimately downstream from #1449.

For any future additional capabilities in the API, experience suggests that keyword arguments should be used fairly liberally. Even if it initially looks like a function only needs one optional parameter, it only requires one new capability to be added to that function that itself requires an optional argument, and you then have argument order ambiguity.

Only two remaining functions within the Python API where it was considered more appropriate to use keyword arguments rather than ordered arguments. Was raised in #1736, but is ultimately downstream from #1449.
@Lestropie Lestropie self-assigned this Sep 25, 2019
Conflicts:
	lib/mrtrix3/image.py
	lib/mrtrix3/path.py
@Lestropie Lestropie merged commit 1d55673 into dev Oct 3, 2019
@Lestropie Lestropie deleted the python_kwargs branch October 3, 2019 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant