Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 73e2e16

Browse files
doc: fix and clarify documentation for the parse function.
1 parent fb18482 commit 73e2e16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/stdlib/base.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,11 @@ Syntax
405405

406406
.. function:: parse(str, start; greedy=true, raise=true)
407407

408-
Parse the expression string and return an expression (which could later be passed to eval for execution). Start is the index of the first character to start parsing (default is 1). If greedy is true (default), parse will try to consume as much input as it can; otherwise, it will stop as soon as it has parsed a valid token. If raise is true (default), parse errors will raise an error; otherwise, parse will return the error as an expression object.
408+
Parse the expression string and return an expression (which could later be passed to eval for execution). Start is the index of the first character to start parsing. If ``greedy`` is true (default), ``parse`` will try to consume as much input as it can; otherwise, it will stop as soon as it has parsed a valid expression. If ``raise`` is true (default), syntax errors will raise an error; otherwise, ``parse`` will return an expression that will raise an error upon evaluation.
409409

410410
.. function:: parse(str; raise=true)
411411

412-
Parse the whole string greedily, returning a single expression. An error is thrown if there are additional characters after the first expression.
412+
Parse the whole string greedily, returning a single expression. An error is thrown if there are additional characters after the first expression. If ``raise`` is true (default), syntax errors will raise an error; otherwise, ``parse`` will return an expression that will raise an error upon evaluation.
413413

414414
Iteration
415415
---------

0 commit comments

Comments
 (0)