Commit fff5325
committed
Bug 415514 reported that e.g.
"%#x" % 0
blew up, at heart because C sprintf supplies a base marker if and only if
the value is not 0. I then fixed that, by tolerating C's inconsistency
when it does %#x, and taking away that *Python* produced 0x0 when
formatting 0L (the "long" flavor of 0) under %#x itself. But after talking
with Guido, we agreed it would be better to supply 0x for the short int
case too, despite that it's inconsistent with C, because C is inconsistent
with itself and with Python's hex(0) (plus, while "%#x" % 0 didn't work
before, "%#x" % 0L *did*, and returned "0x0"). Similarly for %#X conversion.1 parent bfb0cf8 commit fff5325
3 files changed
Lines changed: 47 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2575 | 2575 | | |
2576 | 2576 | | |
2577 | 2577 | | |
2578 | | - | |
2579 | | - | |
2580 | | - | |
2581 | | - | |
2582 | | - | |
2583 | | - | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
| 2578 | + | |
| 2579 | + | |
2588 | 2580 | | |
2589 | 2581 | | |
2590 | 2582 | | |
| |||
2678 | 2670 | | |
2679 | 2671 | | |
2680 | 2672 | | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
2681 | 2683 | | |
2682 | 2684 | | |
2683 | 2685 | | |
| |||
3023 | 3025 | | |
3024 | 3026 | | |
3025 | 3027 | | |
3026 | | - | |
3027 | | - | |
3028 | | - | |
3029 | 3028 | | |
3030 | | - | |
3031 | | - | |
3032 | | - | |
3033 | | - | |
3034 | | - | |
3035 | | - | |
3036 | | - | |
3037 | | - | |
3038 | | - | |
3039 | | - | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
3040 | 3033 | | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
3041 | 3039 | | |
3042 | 3040 | | |
3043 | 3041 | | |
| |||
3049 | 3047 | | |
3050 | 3048 | | |
3051 | 3049 | | |
3052 | | - | |
3053 | | - | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
3054 | 3053 | | |
3055 | 3054 | | |
3056 | 3055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4683 | 4683 | | |
4684 | 4684 | | |
4685 | 4685 | | |
4686 | | - | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
| 4693 | + | |
4687 | 4694 | | |
4688 | 4695 | | |
4689 | 4696 | | |
| |||
5081 | 5088 | | |
5082 | 5089 | | |
5083 | 5090 | | |
5084 | | - | |
5085 | | - | |
5086 | | - | |
5087 | | - | |
5088 | | - | |
5089 | | - | |
5090 | | - | |
5091 | | - | |
5092 | | - | |
5093 | | - | |
| 5091 | + | |
| 5092 | + | |
| 5093 | + | |
| 5094 | + | |
5094 | 5095 | | |
| 5096 | + | |
| 5097 | + | |
| 5098 | + | |
| 5099 | + | |
| 5100 | + | |
5095 | 5101 | | |
5096 | 5102 | | |
5097 | 5103 | | |
| |||
5102 | 5108 | | |
5103 | 5109 | | |
5104 | 5110 | | |
5105 | | - | |
5106 | | - | |
| 5111 | + | |
5107 | 5112 | | |
| 5113 | + | |
5108 | 5114 | | |
5109 | 5115 | | |
5110 | 5116 | | |
| |||
0 commit comments