Skip to content

Conversation

@brandon-avantus
Copy link

If the element type of an Iterator is object, then query for its actual type before attempting to convert to a Python object.

What does this implement/fix? Explain your changes.

This adds a quick check for the element type of an Iterator. If generic element type is object, then the item type will be used for converting to a Python type instead of the generic type.

Does this close any currently open issues?

Fixes #2679

Any other comments?

None.

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Ensure you have signed the .NET Foundation CLA
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

If the element type of an Iterator is `object`, then query for its
actual type before attempting to convert to a Python object.

Fixes pythonnet#2679
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User encoding is skipped for elements iterated from non-generic .NET containers/enumerators

1 participant