Skip to content

Commit f940515

Browse files
authored
fix py. macro for go and go-loop (#168)
1 parent 9939ccf commit f940515

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libpython_clj2/python.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,10 @@ user> (py/call-attr inst \"addarg\" 10)
490490
(defmacro py.
491491
"Class/object method syntax. (py. obj method arg1 arg2 ... argN)
492492
is equivalent to Python's obj.method(arg1, arg2, ..., argN) syntax."
493-
[x & args]
494-
(list* (into (vector #'$a x) args)))
493+
[x method-name & args]
494+
;; method-name cast to a string specifically for go and go-loop
495+
;; compatability
496+
`(~#'$a ~x ~(str method-name) ~@args))
495497

496498

497499
(defmacro py*

0 commit comments

Comments
 (0)