Add docs for read-str
This commit is contained in:
parent
2d7134a1be
commit
0146cc8e4d
@ -1065,6 +1065,21 @@ if *from-file* ends before a complete expression can be parsed.
|
|||||||
hyfriends!
|
hyfriends!
|
||||||
EOF!
|
EOF!
|
||||||
|
|
||||||
|
read-str
|
||||||
|
--------
|
||||||
|
|
||||||
|
Usage: ``(read "string")``
|
||||||
|
|
||||||
|
This is essentially a wrapper around `read` which reads expressions from a
|
||||||
|
string:
|
||||||
|
|
||||||
|
.. code-block:: hy
|
||||||
|
|
||||||
|
=> (read-str "(print 1)")
|
||||||
|
(u'print' 1L)
|
||||||
|
=> (eval (read-str "(print 1)"))
|
||||||
|
1
|
||||||
|
=>
|
||||||
|
|
||||||
.. _remove-fn:
|
.. _remove-fn:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user