We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed032d3 commit 21d549cCopy full SHA for 21d549c
Lib/test/test_builtin.py
@@ -367,7 +367,6 @@ class C3(C2): pass
367
c3 = C3()
368
self.assertTrue(callable(c3))
369
370
- @unittest.expectedFailure # TODO: RUSTPYTHON; OverflowError: Python int too large to convert to Rust isize
371
def test_chr(self):
372
self.assertEqual(chr(0), '\0')
373
self.assertEqual(chr(32), ' ')
crates/vm/src/stdlib/builtins.rs
@@ -88,7 +88,7 @@ mod builtins {
88
#[pyfunction]
89
fn chr(i: PyIntRef, vm: &VirtualMachine) -> PyResult<CodePoint> {
90
let value = i
91
- .try_to_primitive::<isize>(vm)?
+ .as_bigint()
92
.to_u32()
93
.and_then(CodePoint::from_u32)
94
.ok_or_else(|| vm.new_value_error("chr() arg not in range(0x110000)"))?;
0 commit comments