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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy