- Notifications
You must be signed in to change notification settings - Fork749
Make indexers work for interface objects#1246
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecov-commenter commentedOct 5, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #1246 +/- ##======================================= Coverage 86.25% 86.25% ======================================= Files 1 1 Lines 291 291 ======================================= Hits 251 251 Misses 40 40
Flags with carried forward coverage won't be shown.Click here to find out more. Continue to review full report at Codecov.
|
lostmsu left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Two things related to each other:
- Please, add a negative test (if one does not exist yet). E.g. construct an empty
System.Object
, and ensure Python can't index it for read or write. - Consider only assigning
mp*_subscript
slots only when the type actually supports indexing like you did withtp_next
.
Makes the following work instead of throwing an exception:```pythonfrom System.Collections.Generic import Dictionary, IDictionaryd = IDictionary[str, str](Dictionary[str, str]())d["one"] = "1"assert d["one"] == "1"```
I've added the two things you asked for. The erasing of the slots is ugly. We should consider moving |
Great, thanks! I agree on Overall it might make sense to move the majority of |
Uh oh!
There was an error while loading.Please reload this page.
What does this implement/fix? Explain your changes.
Makes the following work instead of throwing an exception:
Does this close any currently open issues?
No
Checklist
Check all those that are applicable and complete.
AUTHORS
CHANGELOG