Commit a9ddd6d
committed
py: Simplify and improve mp_get_index.
It has (again) a fast path for ints, and a simplified "slow" path for
everything else.
Also simplify the way str indexing is done (now matches tuple and list).1 parent 5f3fe3a commit a9ddd6d
2 files changed
Lines changed: 13 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
286 | 284 | | |
287 | 285 | | |
288 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 223 | + | |
231 | 224 | | |
232 | | - | |
| 225 | + | |
233 | 226 | | |
234 | 227 | | |
235 | 228 | | |
236 | 229 | | |
237 | 230 | | |
| 231 | + | |
238 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
239 | 237 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 238 | + | |
243 | 239 | | |
| 240 | + | |
244 | 241 | | |
245 | 242 | | |
246 | 243 | | |
| |||
0 commit comments