Make indexers work for interface objects#1246
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.
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*_subscriptslots 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.
AUTHORSCHANGELOG