Added documentation for new core function disassemble
Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
This commit is contained in:
parent
7c2a76f7e6
commit
1bdf0d04c3
@ -29,6 +29,27 @@ Raises ``TypeError`` if ``(not (numeric? x))``.
|
|||||||
11.3
|
11.3
|
||||||
|
|
||||||
|
|
||||||
|
.. _disassemble-fn:
|
||||||
|
|
||||||
|
disassemble
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Usage: ``(disassemble tree &optional [codegen false])``
|
||||||
|
|
||||||
|
Dump the Python AST for given Hy tree to standard output. If codegen
|
||||||
|
is true function prints Python code instead.
|
||||||
|
|
||||||
|
.. code-block:: clojure
|
||||||
|
|
||||||
|
=> (disassemble '(print "Hello World!"))
|
||||||
|
Module(
|
||||||
|
body=[
|
||||||
|
Expr(value=Call(func=Name(id='print'), args=[Str(s='Hello World!')], keywords=[], starargs=None, kwargs=None))])
|
||||||
|
|
||||||
|
=> (disassemble '(print "Hello World!"))
|
||||||
|
print('Hello World!')
|
||||||
|
|
||||||
|
|
||||||
.. _emtpy?-fn:
|
.. _emtpy?-fn:
|
||||||
|
|
||||||
empty?
|
empty?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user