diff options
author | 2015-02-17 09:46:49 +0000 | |
---|---|---|
committer | 2015-02-17 09:46:49 +0000 | |
commit | 52fb6a26bd45bc2db2651bac8505833a1a992f78 (patch) | |
tree | 6d9e3498b92e94f358e9189450d798e10eb399e5 /src/main/java/com/google/devtools/build/lib/packages | |
parent | a962b0fadff20d18517ecf29296399c4ebbe1ced (diff) |
Rename Skylark's range fn "end" arg to "stop" + some cleanups.
--
MOS_MIGRATED_REVID=86474606
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java b/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java index 4430ba7f87..05914afc4e 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java +++ b/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java @@ -661,7 +661,7 @@ public class MethodLibrary { }; @SkylarkBuiltin(name = "range", returnType = SkylarkList.class, - doc = "Creates a list where items go from <code>start</code> to <code>end</code>, using a " + doc = "Creates a list where items go from <code>start</code> to <code>stop</code>, using a " + "<code>step</code> increment. If a single argument is provided, items will " + "range from 0 to that element." + "<pre class=language-python>range(4) == [0, 1, 2, 3]\n" @@ -672,9 +672,9 @@ public class MethodLibrary { doc = "Value of the first element"), }, optionalParams = { - @Param(name = "end", type = Integer.class, + @Param(name = "stop", type = Integer.class, doc = "The first item <i>not</i> to be included in the resulting list; " - + "generation of the list stops before <code>end</code> is reached."), + + "generation of the list stops before <code>stop</code> is reached."), @Param(name = "step", type = Integer.class, doc = "The increment (default is 1). It may be negative.")}) private static final Function range = @@ -686,10 +686,10 @@ public class MethodLibrary { int stop; if (args[1] == null) { start = 0; - stop = Type.INTEGER.convert(args[0], "end"); + stop = Type.INTEGER.convert(args[0], "stop"); } else { start = Type.INTEGER.convert(args[0], "start"); - stop = Type.INTEGER.convert(args[1], "end"); + stop = Type.INTEGER.convert(args[1], "stop"); } int step = args[2] == null ? 1 : Type.INTEGER.convert(args[2], "step"); if (step == 0) { |