[Lldb-commits] [PATCH] D14023: Fix uses of range / xrange for Python 3

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 23 11:21:57 PDT 2015


zturner created this revision.
zturner added a reviewer: tfiala.
zturner added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer.

Hi Todd,

I've been putting most of this stuff in withouty review, but I figure every once in a while I should pass one your way as a sanity check to make sure I'm still on the right path.

Anyway, for this one.  `xrange()` is removed from Python 3, and `range()` is no longer a function but a "sequence object" which must be converted to a list.  In theory I could have used `six.moves.xrange`, but I decided that the efficiency provided by `xrange` wasn't important in the code, so I changed it all to use `range` instead.

http://reviews.llvm.org/D14023

Files:
  test/example/TestSequenceFunctions.py
  test/functionalities/inferior-assert/TestInferiorAssert.py
  test/functionalities/inferior-crashing/TestInferiorCrashing.py
  test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
  test/lang/go/goroutines/TestGoroutines.py
  test/lang/go/types/TestGoASTContext.py
  test/lldbutil.py
  test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14023.38244.patch
Type: text/x-patch
Size: 7686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151023/35449ad1/attachment.bin>


More information about the lldb-commits mailing list