summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2020-04-18 18:56:18 +0100
committerMichael Williamson <mike@zwobble.org>2020-04-18 18:56:18 +0100
commit931f17d5a4eae655d29d85c4bbd00ca033dbf69c (patch)
treebd6aae17b57b31838a053977841418c703319268 /README.rst
parent00d2f06345f88b30d43343b1f5e6c4d6659edce1 (diff)
Document program_string
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index e2b5e21..573d1e8 100644
--- a/README.rst
+++ b/README.rst
@@ -109,3 +109,10 @@ Call ``iter()`` to get all of the output elements as an iterator:
assert next(iterator, None) == 3
assert next(iterator, None) == 4
assert next(iterator, None) == None
+
+The original program string is available on a compiled program as the ``program_string`` attribute:
+
+.. code-block:: python
+
+ program = jq.compile(".")
+ assert program.program_string == "."