[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring
Senthil Kumaran
report at bugs.python.org
Mon Sep 16 02:36:08 CEST 2013
Senthil Kumaran added the comment:
Tim Peters added the comment:
> ..., _fast=slow, ...
>
> in an argument list means we endure the slow lookup (of `slow`) only
> once, when the function is first defined. When the function is
> _called_, that binding is available via the local (much faster lookup)
> variable `_fast`.
>
> Purely a speed trick, but can make a real difference in very heavily
> used functions.
Thanks for the answer, Tim. Interesting optimization.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14927>
_______________________________________
More information about the Python-bugs-list
mailing list