FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

documentation update for keyword arguments by den-run-ai · Pull Request #483 · pythonnet/pythonnet · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 2 additions & 1 deletion CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].

### Added
- Added clr.GetClrType (#432)(#433)
- Added `Foo` feature
- Allowed passing None for nullable args (#460)
- Added keyword arguments based on C# syntax for calling CPython methods (#461)


### Changed

Expand Down
4 changes: 2 additions & 2 deletions README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ from System.Windows.Forms import Form
a `using (Py.GIL()) {/* Your code here */}` block.
- Import python modules using `dynamic mod = Py.Import("mod")`,
then you can call functions as normal, eg `mod.func(args)`.
- Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))`
- Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` or `mod.func(args, keywordargname=keywordargvalue)`
to apply keyword arguments.
- All python objects should be declared as `dynamic` type.
- Mathematical operations involving python and literal/managed types must
Expand All @@ -67,7 +67,7 @@ static void Main(string[] args)
dynamic a = np.array(new List<float> { 1, 2, 3 });
Console.WriteLine(a.dtype);

dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32));
dynamic b = np.array(new List<float> { 6, 5, 4 }, dtype=np.int32);
Console.WriteLine(b.dtype);

Console.WriteLine(a * b);
Expand Down

Back | FazBrowse Home | New Git URL