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

Adds support to convert iterators to arrays#928

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 1 commit intopythonnet:masterfromjmlidbetter:iters_to_arrays
Aug 5, 2019

Conversation

jmlidbetter
Copy link
Contributor

@jmlidbetterjmlidbetter commentedAug 1, 2019
edited
Loading

What does this implement/fix? Explain your changes.

Python 3 has much more liberal use of iterators, e.g. getting keys or values from a dictionary. This adds functionality to convert python object which support the iterator protocol to arrays in C#.

Does this close any currently open issues?

No

Any other comments?

N/A

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
  • Add yourself toAUTHORS
  • Updated theCHANGELOG

@jmlidbetterjmlidbetterforce-pushed theiters_to_arrays branch 2 times, most recently from0bd4a10 to2e51321CompareAugust 2, 2019 07:47
@filmor
Copy link
Member

This looks like a good addition feature-wise, but there is quite a bit of duplicated code in it. I think it would be better if we had /one/ implementation based on the iterator protocol, that just uses an additional size hint iflen is implemented.

@jmlidbetter
Copy link
ContributorAuthor

This looks like a good addition feature-wise, but there is quite a bit of duplicated code in it. I think it would be better if we had /one/ implementation based on the iterator protocol, that just uses an additional size hint iflen is implemented.

Sure. Presumably sequence protocol => iterator protocol?

@filmor
Copy link
Member

It says so in the docs:https://docs.python.org/2/library/stdtypes.html#iterator-types as well ashttps://docs.python.org/3/library/stdtypes.html#iterator-types:

Sequences [...] always support the iteration methods.

jmlidbetter reacted with hooray emoji

@jmlidbetter
Copy link
ContributorAuthor

It says so in the docs:https://docs.python.org/2/library/stdtypes.html#iterator-types as well ashttps://docs.python.org/3/library/stdtypes.html#iterator-types:

Sequences [...] always support the iteration methods.

Ok, have redone - always uses iterator protocol now.

@Cronan
Copy link
Contributor

@filmor Passed!

@filmor
Copy link
Member

This looks great, thanks :)

@filmorfilmor merged commit51a1868 intopythonnet:masterAug 5, 2019
AlexCatarino pushed a commit to QuantConnect/pythonnet that referenced this pull requestJun 18, 2020
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.

3 participants
@jmlidbetter@filmor@Cronan

[8]ページ先頭

©2009-2025 Movatter.jp