Commit 078151d
committed
Implement stage B0 of PEP 237: add warnings for operations that
currently return inconsistent results for ints and longs; in
particular: hex/oct/%u/%o/%x/%X of negative short ints, and x<<n that
either loses bits or changes sign. (No warnings for repr() of a long,
though that will also change to lose the trailing 'L' eventually.)
This introduces some warnings in the test suite; I'll take care of
those later.1 parent d92ae84 commit 078151d
4 files changed
Lines changed: 50 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
662 | | - | |
| 662 | + | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
672 | 676 | | |
673 | 677 | | |
674 | | - | |
675 | | - | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
676 | 686 | | |
677 | 687 | | |
678 | 688 | | |
| |||
761 | 771 | | |
762 | 772 | | |
763 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
764 | 780 | | |
765 | 781 | | |
766 | 782 | | |
| |||
773 | 789 | | |
774 | 790 | | |
775 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
776 | 798 | | |
777 | 799 | | |
778 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3311 | 3311 | | |
3312 | 3312 | | |
3313 | 3313 | | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
3314 | 3320 | | |
3315 | 3321 | | |
3316 | 3322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5219 | 5219 | | |
5220 | 5220 | | |
5221 | 5221 | | |
| 5222 | + | |
| 5223 | + | |
| 5224 | + | |
| 5225 | + | |
5222 | 5226 | | |
5223 | 5227 | | |
5224 | 5228 | | |
| |||
5294 | 5298 | | |
5295 | 5299 | | |
5296 | 5300 | | |
| 5301 | + | |
| 5302 | + | |
| 5303 | + | |
| 5304 | + | |
| 5305 | + | |
| 5306 | + | |
5297 | 5307 | | |
5298 | 5308 | | |
5299 | 5309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | | - | |
| 1157 | + | |
1158 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
1159 | 1167 | | |
1160 | 1168 | | |
1161 | 1169 | | |
| |||
0 commit comments