Skip to content

Commit b98d9a7

Browse files
authored
Merge pull request #1506 from mathics/doc-abstracts
Fill in more summary_text for builtin functions
2 parents 0eba075 + 341bae7 commit b98d9a7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

mathics/builtin/list/constructing.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ class Array(Builtin):
6969
"plen": "`1` and `2` should have the same length.",
7070
}
7171

72+
summary_text = "form an array of any dimension by applying a function to successive indices"
73+
7274
def apply(self, f, dimsexpr, origins, head, evaluation):
7375
"Array[f_, dimsexpr_, origins_:1, head_:List]"
7476

@@ -130,6 +132,7 @@ class ConstantArray(Builtin):
130132
"ConstantArray[c_, n_Integer]": "ConstantArray[c, {n}]",
131133
}
132134

135+
summary_text = "form a constant array of any dimension"
133136

134137
class Normal(Builtin):
135138
"""
@@ -139,6 +142,8 @@ class Normal(Builtin):
139142
</dl>
140143
"""
141144

145+
summary_text = "converts objects to normal expressions"
146+
142147

143148
class Range(Builtin):
144149
"""
@@ -165,6 +170,8 @@ class Range(Builtin):
165170

166171
attributes = ("Listable", "Protected")
167172

173+
summary_text = "form a list from a range of numbers or other objects"
174+
168175
def apply(self, imin, imax, di, evaluation):
169176
"Range[imin_?RealNumberQ, imax_?RealNumberQ, di_?RealNumberQ]"
170177

@@ -213,6 +220,8 @@ class Permutations(Builtin):
213220
"nninfseq": "The number specified at position 2 of `` must be a non-negative integer, All, or Infinity.",
214221
}
215222

223+
summary_text = "forms permutations of a list"
224+
216225
def apply_argt(self, evaluation):
217226
"Permutations[]"
218227
evaluation.message(self.get_name(), "argt")
@@ -412,6 +421,8 @@ class Table(_IterationFunction):
412421
"Table[expr_, n_Integer]": "Table[expr, {n}]",
413422
}
414423

424+
summary_text = "form a Mathematical Table of any dimension from expressions or lists"
425+
415426
def get_result(self, items):
416427
return Expression(SymbolList, *items)
417428

@@ -444,6 +455,9 @@ class Tuples(Builtin):
444455
= {{a, c}, {a, d}, {b, c}, {b, d}}
445456
"""
446457

458+
summary_text = "form n-tuples from a list"
459+
460+
447461
def apply_n(self, expr, n, evaluation):
448462
"Tuples[expr_, n_Integer]"
449463

0 commit comments

Comments
 (0)