Added documentation for new core function disassemble

Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
This commit is contained in:
Vasudev Kamath 2014-01-05 19:12:19 +05:30
parent 7c2a76f7e6
commit 1bdf0d04c3

View File

@ -29,6 +29,27 @@ Raises ``TypeError`` if ``(not (numeric? x))``.
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:
empty?