zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

[v3] consider using position only and keyword only arguments

Open joshmoore opened this issue 3 years ago • 3 comments

As a side note we might consider using position only and keyword only arguments in Zarr 3 to avoid these issues around renaming arguments.

Originally posted by @jakirkham in https://github.com/zarr-developers/zarr-python/issues/1018#issuecomment-1116879414

joshmoore avatar May 04 '22 06:05 joshmoore

@jakirkham and @joshmoore - would either of you care to expand on this issue to make it more actionable?

jhamman avatar Apr 05 '24 20:04 jhamman

My limited memory, @jhamman, is that for signatures with very long lists of arguments, maintaining the ordering of those lists becomes a burden and therefore one can make use of keyword only arguments -- https://peps.python.org/pep-3102/ -- to simplify things.

joshmoore avatar Apr 16 '24 10:04 joshmoore

My first attempt at recreating the top level API for v3 definitely highlighted that this would be useful. I could use some input on #1884 deciding how best to introduce this.

jhamman avatar May 17 '24 05:05 jhamman