[mypyc] Add bytes index primitive - #10950
Conversation
|
mistakely deleted an irbuilding test |
JukkaL
left a comment
There was a problem hiding this comment.
Looks mostly good, just a few small comments.
Can you also test this with a microbenchmark?
JukkaL
left a comment
There was a problem hiding this comment.
Thanks for the updates! One more comment about tests, otherwise looks good.
| b[4] | ||
| with assertRaises(IndexError, "index out of range"): | ||
| b[-5] | ||
| b2 = bytearray([175, 255, 128, 22]) |
There was a problem hiding this comment.
Use b2: bytes here as well.
There was a problem hiding this comment.
This still needs to be updated.
|
Also the Windows 32-bit build is failing. |
JukkaL
left a comment
There was a problem hiding this comment.
One remaining thing, otherwise ready to merge.
| b[4] | ||
| with assertRaises(IndexError, "index out of range"): | ||
| b[-5] | ||
| b2 = bytearray([175, 255, 128, 22]) |
There was a problem hiding this comment.
This still needs to be updated.
|
This test case is for |
|
Ah, fair enough. This is ready to merge then. |
Description
Implements part of mypyc/mypyc#880.
__getitem__ops for bytes(intandshort_intas index parameter)Test Plan
Add several run tests and an irbuild test.