| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,9 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. | |||
| 9 | 9 | ||
| 10 | 10 | ### Added | |
| 11 | 11 | - Added clr.GetClrType (#432)(#433) | |
| 12 | - - Added `Foo` feature | ||
| 13 | 12 | - Allowed passing None for nullable args (#460) | |
| 13 | + - Added keyword arguments based on C# syntax for calling CPython methods (#461) | ||
| 14 | + | ||
| 14 | 15 | ||
| 15 | 16 | ### Changed | |
| 16 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,7 +42,7 @@ from System.Windows.Forms import Form | |||
| 42 | 42 | a `using (Py.GIL()) {/* Your code here */}` block. | |
| 43 | 43 | - Import python modules using `dynamic mod = Py.Import("mod")`, | |
| 44 | 44 | then you can call functions as normal, eg `mod.func(args)`. | |
| 45 | - - Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` | ||
| 45 | + - Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` or `mod.func(args, keywordargname=keywordargvalue)` | ||
| 46 | 46 | to apply keyword arguments. | |
| 47 | 47 | - All python objects should be declared as `dynamic` type. | |
| 48 | 48 | - Mathematical operations involving python and literal/managed types must | |
@@ -67,7 +67,7 @@ static void Main(string[] args) | |||
| 67 | 67 | dynamic a = np.array(new List<float> { 1, 2, 3 }); | |
| 68 | 68 | Console.WriteLine(a.dtype); | |
| 69 | 69 | ||
| 70 | - dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32)); | ||
| 70 | + dynamic b = np.array(new List<float> { 6, 5, 4 }, dtype=np.int32); | ||
| 71 | 71 | Console.WriteLine(b.dtype); | |
| 72 | 72 | ||
| 73 | 73 | Console.WriteLine(a * b); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments