Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow decoders to decode Python types derived from primitives#1986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
filmor merged 2 commits intopythonnet:masterfromlosttech:FloatDerivedCodec
Oct 28, 2022

Conversation

lostmsu
Copy link
Member

What does this implement/fix? Explain your changes.

When a Python instance needs to be converted toSystem.Object, and the Python type is derived from one of the primitives (e.g.numpy.float64 is derived fromfloat), allow a custom decoder to override the default behavior (which would have been converting toSystem.Double).

Does this close any currently open issues?

It addresses the primary concern of#1957

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change

…s when target type is System.Objectuseful to be able to change what numpy.float64 is converted torelated topythonnet#1957this is an alternative topythonnet#1958
@filmor
Copy link
Member

Looks good to me. I think this is a good stepping stone to eventually retire built-in primitive conversion in favour of using codecs for everything.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@lostmsu@filmor

[8]ページ先頭

©2009-2025 Movatter.jp