Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c8af12

Browse files
authored
Merge pull requestRustPython#4383 from yt2b/fix_hex_prefix
Fix hex prefix
2 parentsbdb9c1d +f07e03c commit2c8af12

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎extra_tests/snippets/builtin_format.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ def test_zero_padding():
2828
assertf'{65536:,}'=='65,536'
2929
assertf'{4294967296:,}'=='4,294,967,296'
3030
assert'F'=="{0:{base}}".format(15,base="X")
31+
assertf'{255:#X}'=="0XFF"

‎vm/src/format.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ impl FormatSpec {
456456
Some(FormatType::Binary) =>"0b",
457457
Some(FormatType::Octal) =>"0o",
458458
Some(FormatType::HexLower) =>"0x",
459-
Some(FormatType::HexUpper) =>"0x",
459+
Some(FormatType::HexUpper) =>"0X",
460460
_ =>"",
461461
}
462462
}else{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp