From 764c8333faf3c630cbff5e562bf8c22a1676265e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 18 Apr 2020 18:48:30 +0100 Subject: Add __repr__ to program --- jq.pyx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'jq.pyx') diff --git a/jq.pyx b/jq.pyx index a27e238..6d26470 100644 --- a/jq.pyx +++ b/jq.pyx @@ -131,6 +131,9 @@ cdef class _Program(object): program_with_input._bytes_input = string_input.encode("utf8") return program_with_input + def __repr__(self): + return "jq.compile({!r})".format(self._program_bytes.decode("utf8")) + cdef class _ProgramWithInput(object): cdef object _program_bytes -- cgit v1.2.3