Move the IEnumerable converter in Converter.ToPython to the TypeCode.Object case.#3
Closed
patstew wants to merge 1 commit intofkarb:python3from
Closed
Move the IEnumerable converter in Converter.ToPython to the TypeCode.Object case.#3patstew wants to merge 1 commit intofkarb:python3from
patstew wants to merge 1 commit intofkarb:python3from
Conversation
Member
|
Hi, hmm not so sure about this... what if you had an object that was IEnumerable but you didn't want it to be converted eagerly to a list? E.g. a database result set? Wouldn't it be better to return a Python wrapper that implements iter? cheers, |
Author
|
Fair enough. I put this back because someone emailed me about the Readme example I wrote a while ago not working anymore. It's useful for what I'm doing but I suppose it might be quite annoying for others. I think you're right, it'd be better to implement the sequence interface on ILists, iter on IEnumerables and the mapping interface on IDictionaries. I'll look at doing that at some point. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think this is the right place for it, it certainly fixes the test code I left in Readme.md (which is currently broken).