You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/conversion-to-python.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,15 @@ From Python, this occurs when converting the return value of a Julia function.
34
34
35
35
See below for an explanation of the `juliacall.*Value` types.
36
36
37
+
### [Custom rules](@id jl2py-conversion-custom)
38
+
39
+
You may define a new conversion rule for your new type `T` by overloading `getpy(::T)`.
40
+
41
+
```@docs
42
+
PythonCall.getpy
43
+
PythonCall.ispy
44
+
```
45
+
37
46
## [Wrapper types](@id julia-wrappers)
38
47
39
48
Apart from a few fundamental immutable types, all Julia values are by default converted into Python to some [`AnyValue`](#juliacall.AnyValue) object, which wraps the original value, but giving it a Pythonic interface.
0 commit comments