-
Notifications
You must be signed in to change notification settings - Fork 748
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
|
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: ```python from System.Collections.Generic import Dictionary, IDictionary d = IDictionary[str, str](Dictionary[str, str]()) d["one"] = "1" assert d["one"] == "1" ```
ee9b958
to
cce614f
Compare
I've added the two things you asked for. The erasing of the slots is ugly. We should consider moving |
cce614f
to
a182b68
Compare
a182b68
to
12fdaab
Compare
Great, thanks! I agree on Overall it might make sense to move the majority of |
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