Skip to content

Commit

Permalink
Go over doctest text for ReadLine[]
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Sep 26, 2024
1 parent c5d6311 commit 2a042f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mathics/builtin/files_io/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ class ReadList(Read):
<dd>Reads a sequence of specified types until the end of file.
</dl>
To read all the numbers in a file and returns a list of them:
To read all the numbers in a file and return a list of them:
>> ReadList["ExampleData/numbers.txt", Number]
= {11.1, 22.2, 33.3, 44.4, 55.5, 66.6}
Expand Down Expand Up @@ -877,11 +877,11 @@ class ReadList(Read):
>> ReadList["ExampleData/strings.txt", Character]
= ...
And now are the integer codes corresponding to each of the bytes in the file:
And now, here are the integer codes corresponding to each of the bytes in the file:
>> ReadList["ExampleData/strings.txt", Byte]
= {72, 101, 114, 101, 32, 105, 115, 32, 116, 101, 120, 116, 46, 10, 65, 110, 100, 32, 109, 111, 114, 101, 32, 116, 101, 120, 116, 46, 10}
The data can be read by "words":
But the data can also be read by "words":
>> ReadList["ExampleData/strings.txt", Word]
= {Here, is, text., And, more, text.}
Expand Down

0 comments on commit 2a042f4

Please sign in to comment.