Commit 6e5680f
committed
For some reason (probably cut and paste), __ipow__ for new-style
classes was called with three arguments. This makes no sense, there's
no way to pass in the "modulo" 3rd argument as for __pow__, and
classic classes don't do this. [SF bug 620179]
I don't want to backport this to 2.2.2, because it could break
existing code that has developed a work-around. Code in 2.2.2 that
wants to use __ipow__ and wants to be forward compatible with 2.3
should be written like this:
def __ipow__(self, exponent, modulo=None):
...1 parent 13b1a5c commit 6e5680f
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3306 | 3306 | | |
3307 | 3307 | | |
3308 | 3308 | | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
3309 | 3319 | | |
3310 | 3320 | | |
3311 | 3321 | | |
| |||
3401 | 3411 | | |
3402 | 3412 | | |
3403 | 3413 | | |
| 3414 | + | |
3404 | 3415 | | |
3405 | 3416 | | |
3406 | 3417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3399 | 3399 | | |
3400 | 3400 | | |
3401 | 3401 | | |
3402 | | - | |
| 3402 | + | |
3403 | 3403 | | |
3404 | 3404 | | |
3405 | 3405 | | |
| |||
4038 | 4038 | | |
4039 | 4039 | | |
4040 | 4040 | | |
4041 | | - | |
| 4041 | + | |
4042 | 4042 | | |
4043 | 4043 | | |
4044 | 4044 | | |
| |||
0 commit comments