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

Make it possible to use inherited indexers#1248

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
lostmsu merged 1 commit intopythonnet:masterfromdanabr:inherited-indexers
Oct 8, 2020

Conversation

danabr
Copy link
Contributor

What does this implement/fix? Explain your changes.

If a class A had indexer, and class B derived from it, Python.NET would
not consider class B to have any indexer.

Does this close any currently open issues?

No

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

@codecov-io
Copy link

codecov-io commentedOct 7, 2020
edited
Loading

Codecov Report

Merging#1248 intomaster willnot change coverage.
The diff coverage isn/a.

Impacted file tree graph

@@           Coverage Diff           @@##           master    #1248   +/-   ##=======================================  Coverage   86.25%   86.25%           =======================================  Files           1        1             Lines         291      291           =======================================  Hits          251      251             Misses         40       40
FlagCoverage Δ
#setup_linux64.94% <ø> (ø)
#setup_windows72.50% <ø> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.


Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updatef808166...1a3d75d. Read thecomment docs.

@lostmsu
Copy link
Member

What about interfaces?

@danabr
Copy link
ContributorAuthor

What about interfaces?

That is already handled by#1246. The calculation of whether something has an indexer or not is done the same way for classes and interfaces. It is all based on the implementation class.

@lostmsu
Copy link
Member

lostmsu commentedOct 7, 2020
edited
Loading

@danabr just to clarify. So if I haveinterface IExtra: IIndexed with indexer defined inIIndexed, but not inIExtra, and in Python doextra = IExtra(extra_impl) (e.g. explicit cast toIExtra), I would be able to doextra[1234]?

If so, I think a test for that scenario should be added totest_indexer_accessed_through_interface introduced in your previous PR.

If a class A had indexer, and class B derived from it, Python.NET wouldnot consider class B to have any indexer.
@danabr
Copy link
ContributorAuthor

Yes. The requested test has been added.

lostmsu reacted with rocket emoji

@lostmsulostmsu merged commitc79be84 intopythonnet:masterOct 8, 2020
@christabella
Copy link
Contributor

This closes#256

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.

4 participants
@danabr@codecov-io@lostmsu@christabella

[8]ページ先頭

©2009-2025 Movatter.jp