[issue33910] update random.Random 's parameter to have a proper name.
Matthias Bussonnier
report at bugs.python.org
Thu Jun 21 05:24:36 EDT 2018
Matthias Bussonnier <bussonniermatthias at gmail.com> added the comment:
Thanks @rhettinger, this is a perfectly valid position, and one of the respons I was expecting.
> That said, it doesn't seem to have ever caused a problem in practice (this API has been around for a very long time)
I have myself not found a lot of usage of `random.Random(x=123)` though I can't say what the lack of occurences is due to. If I have the choice between
- Random(123)
- Random(x=123)
- Random(seed=123)
I definitively find `Random(x=123)` the least readable. I can guess what `Random(123)` means, `Random(seed=123)` is self-explanatory, `Random(x=123)` will make me doubt what this means. So you might say no one as reported problem because no one is using it...
Yes `x` is explained in the docstring, but that's still requires reading the docstring and reaching for it. As some tab completion engine show functions signatures I want to argue that good parameter names could thus make a difference.
Thanks again for you quick response I'm going to close corresponding PRs.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33910>
_______________________________________
More information about the Python-bugs-list
mailing list