Skip to content

Commit 6c6d231

Browse files
author
Christopher Doris
committed
bugfix
1 parent 4b89ee7 commit 6c6d231

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/jlwrap/any.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const pyjlanytype = pynew()
22

33
pyjlany_repr(self) = Py("<jl $(repr(self))>")
44

5-
pyjlany_str(self) = Py(string(self))
5+
# Note: string(self) doesn't always return a String
6+
pyjlany_str(self) = Py(sprint(print, self))
67

78
function pyjlany_getattr(self, k_::Py)
89
k = Symbol(pyjl_attr_py2jl(pyconvert(String, k_)))

0 commit comments

Comments
 (0)