From 931f17d5a4eae655d29d85c4bbd00ca033dbf69c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 18 Apr 2020 18:56:18 +0100 Subject: Document program_string --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.rst') 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 == "." -- cgit v1.2.3