@@ -4,18 +4,26 @@ Use this guide to help with migrating code from v0.9 to v1.
44
55## Core functionality
66
7- Comparisons (` == ` , ` < ` , etc.) between Python objects ` Py ` , or between ` Py ` and ` Number ` ,
7+ Comparisons (` == ` , ` < ` , etc.) between Python objects ` Py ` ,
88used to return ` Py ` but now return ` Bool ` . The old behaviour was a pun but broke the
99Base API behaviour of these functions. These comparisons will now raise an error if the
1010underlying Python operation does not return ` bool ` .
1111
1212* Instead of ` pytruth(Py(3) < Py(5)) ` use ` Py(3) < Py(5) ` .
1313* Instead of ` Py(3) < Py(5) ` use ` Py(Py(3) < Py(5)) ` .
14- * Instead of ` np.array([1,2,3]) < Py(3) ` use ` pylt(np.array([1,2,3]), Py(3) ) ` . This is
14+ * Instead of ` np.array([1,2,3]) < Py(3) ` use ` pylt(np.array([1,2,3]), 3 ) ` . This is
1515 because comparisons on numpy arrays return arrays of ` bool ` rather than a single
1616 ` bool ` .
1717* Instead of ` pylt(Bool, Py(3), Py(5)) ` you can use ` Py(3) < Py(5) ` .
1818
19+ Comparisons and arithmetic (` == ` , ` < ` , ` + ` , ` * ` , etc.) between ` Py ` and ` Number ` have
20+ been removed. The old behaviour broke the PythonCall convention that the boundary
21+ between Python and Julia is explicit.
22+
23+ * Instead of ` Py(3) < 10 ` use ` Py(3) < Py(10) ` or ` pylt(Py(3), 10) ` .
24+ * Instead of ` Py(5) * 6 ` use ` Py(5) * Py(6) ` or ` pymul(Py(5), 6) ` .
25+ * Instead of ` np.array([1,2,3]) < 3 ` use ` pylt(np.array([1,2,3]), 3) ` .
26+
1927## ` PythonCall.GC `
2028
2129This submodule has been changed to closer mimic the ` Base.GC ` API.
0 commit comments