Skip to content

Commit 5309177

Browse files
committed
Corrections and better examples
1 parent da3aa3e commit 5309177

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pymathics/language/__main__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def eval_alphabet(language_name: String) -> Optional[List[String]]:
3030
if locale not in availableLocales:
3131
return
3232
alphabet_set = LocaleData(locale).getExemplarSet(0, 0)
33-
return to_mathics_list(list(alphabet_set), elements_conversion_fn=String)
33+
return to_mathics_list(*alphabet_set, elements_conversion_fn=String)
3434

3535

3636
class Alphabet(Builtin):
@@ -44,12 +44,18 @@ class Alphabet(Builtin):
4444
<dd> gives the alphabet for the language or class $type$.
4545
</dl>
4646
47-
>> Alphabet[]
48-
= {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}
4947
>> Alphabet["Ukrainian"]
5048
= {a, ä, b, c, d, e, f, g, h, i, j, k, l, m, n, o, ö, p, q, r, s, ß, t, u, ü, v, w, x, y, z}
5149
52-
Some languages have the same basic set of letters.
50+
The alphabet when nothing is specified, "English" is used:
51+
>> Alphabet[]
52+
= {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}
53+
54+
Instead of a language name, you can give a local value:
55+
>> Alphabet["es"]
56+
= {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, é, í, ñ, ó, ú, ü}
57+
58+
Many locales are the same basic set of letters.
5359
>> Alphabet["en_NZ"] == Alphabet["en"]
5460
= True
5561
"""

0 commit comments

Comments
 (0)