From c520987ff4c31a317cbc0c36dcd652dc821838e3 Mon Sep 17 00:00:00 2001 From: Li-Xiang-Ideal <54926635+Li-Xiang-Ideal@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:56:34 +0800 Subject: [PATCH 1/3] Add description for Range --- mathics/builtin/list/constructing.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mathics/builtin/list/constructing.py b/mathics/builtin/list/constructing.py index 4b43557f4..6352b086f 100644 --- a/mathics/builtin/list/constructing.py +++ b/mathics/builtin/list/constructing.py @@ -213,6 +213,12 @@ class Range(Builtin):
'Range[$a$, $b$]'
returns a list of integers from $a$ to $b$. + +
'Range[$a$, $b$, $di$]' +
returns a list of integers from $a$ to $b$ using step $di$. + More specifically, 'Range' starts from $a$ and successively adds \ + increments of $di$ until the result is greater (if $di$ > 0) or \ + less (if $di$ < 0) than $b$. >> Range[5] From 589228558cba8e4334ecf3c85aad369b82fb9ace Mon Sep 17 00:00:00 2001 From: Li-Xiang-Ideal <54926635+Li-Xiang-Ideal@users.noreply.github.com> Date: Mon, 18 Dec 2023 21:18:30 +0800 Subject: [PATCH 2/3] Modify description --- mathics/builtin/list/constructing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathics/builtin/list/constructing.py b/mathics/builtin/list/constructing.py index 6352b086f..ede32e1cb 100644 --- a/mathics/builtin/list/constructing.py +++ b/mathics/builtin/list/constructing.py @@ -212,7 +212,7 @@ class Range(Builtin):
returns a list of integers from 1 to $n$.
'Range[$a$, $b$]' -
returns a list of integers from $a$ to $b$. +
returns a list of (Integer, Rational, Real) numbers from $a$ to $b$.
'Range[$a$, $b$, $di$]'
returns a list of integers from $a$ to $b$ using step $di$. From 912935eb0995d5145a08e691ec62008278f4a04f Mon Sep 17 00:00:00 2001 From: rocky Date: Wed, 17 Jan 2024 07:31:01 -0500 Subject: [PATCH 3/3] list of integers -> list of numbers --- mathics/builtin/list/constructing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathics/builtin/list/constructing.py b/mathics/builtin/list/constructing.py index ede32e1cb..f84ac6232 100644 --- a/mathics/builtin/list/constructing.py +++ b/mathics/builtin/list/constructing.py @@ -215,7 +215,7 @@ class Range(Builtin):
returns a list of (Integer, Rational, Real) numbers from $a$ to $b$.
'Range[$a$, $b$, $di$]' -
returns a list of integers from $a$ to $b$ using step $di$. +
returns a list of numbers from $a$ to $b$ using step $di$. More specifically, 'Range' starts from $a$ and successively adds \ increments of $di$ until the result is greater (if $di$ > 0) or \ less (if $di$ < 0) than $b$.