Skip to content

Commit 9cef2b0

Browse files
committed
docs/reference/repl.rst: Fix some minor errors in the REPL tutorial.
1 parent 993f434 commit 9cef2b0

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

docs/reference/repl.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If your cursor is all the way back at the beginning, pressing RETURN will then
1919
execute the code that you've entered. The following shows what you'd see
2020
after entering a for statement (the underscore shows where the cursor winds up):
2121

22-
>>> for i in range(3):
22+
>>> for i in range(30):
2323
... _
2424

2525
If you then enter an if statement, an additional level of indentation will be
@@ -58,9 +58,10 @@ Auto-completion
5858

5959
While typing a command at the REPL, if the line typed so far corresponds to
6060
the beginning of the name of something, then pressing TAB will show
61-
possible things that could be entered. For example type ``m`` and press TAB
62-
and it should expand to ``machine``. Enter a dot ``.`` and press TAB again. You
63-
should see something like:
61+
possible things that could be entered. For example, first import the machine
62+
module by entering ``import machine`` and pressing RETURN.
63+
Then type ``m`` and press TAB and it should expand to ``machine``.
64+
Enter a dot ``.`` and press TAB again. You should see something like:
6465

6566
>>> machine.
6667
__name__ info unique_id reset
@@ -151,7 +152,7 @@ method by which you're connected to the MicroPython board (USB-serial, or Wifi).
151152
You can perform a soft reset from the REPL by pressing Ctrl-D, or from your python
152153
code by executing: ::
153154

154-
raise SystemExit
155+
machine.soft_reset()
155156

156157
For example, if you reset your MicroPython board, and you execute a dir()
157158
command, you'd see something like this:

0 commit comments

Comments
 (0)