[U-Boot] [PATCH v2 2/8] test/py: Use range() rather than xrange()

Simon Glass sjg at chromium.org
Tue Jul 10 20:57:02 UTC 2018


On 14 September 2017 at 15:34, Paul Burton <paul.burton at imgtec.com> wrote:
> In python 3.x the xrange() function has been removed, and range()
> returns an iterator much like Python 2.x's xrange(). Simply use range()
> in place of xrange() in order to work on both python 2.x & 3.x. This
> will mean a small cost on python 2.x since range() will return a list
> there rather than an iterator, but the cost should be negligible.
>
> Signed-off-by: Paul Burton <paul.burton at imgtec.com>
> Reviewed-by: Stephen Warren <swarren at nvidia.com>
> ---
>
> Changes in v2: None
>
>  test/py/u_boot_console_sandbox.py | 2 +-
>  test/py/u_boot_spawn.py           | 6 +++---
>  test/py/u_boot_utils.py           | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list