[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

Senthil Kumaran report at bugs.python.org
Mon Sep 16 02:06:06 CEST 2013


Senthil Kumaran added the comment:

> Georg Brandl added the comment:
>
> I would propose a leading underscore for these methods; they should make it clear to the user that the parameter is meant to be "private".

+1 to this proposal.
This style is present with randrange, randbelow and shuffle.

> With this line in the docstring, I would wonder "Why is the argument there in the first place?!" (because most people don't know about the optimization technique).

This style has been present since the introduction of these functions.
One attempt to clarify / cleanup shuffle here is: 29430:b80a22250e4f
Georg :  I am unaware of the optimization technique you refer to as
well, it will helpful if you could point to any resource.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14927>
_______________________________________


More information about the Python-bugs-list mailing list