We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fe8a06 commit 7b79c09Copy full SHA for 7b79c09
Lib/test/test_unicode.py
@@ -661,8 +661,6 @@ def test_isascii(self):
661
self.assertFalse("\u20ac".isascii())
662
self.assertFalse("\U0010ffff".isascii())
663
664
- # TODO: RUSTPYTHON
665
- @unittest.expectedFailure
666
def test_isdecimal(self):
667
self.checkequalnofix(False, '', 'isdecimal')
668
self.checkequalnofix(False, 'a', 'isdecimal')
vm/src/builtins/pystr.rs
@@ -709,7 +709,8 @@ impl PyStr {
709
710
#[pymethod]
711
fn isdecimal(&self) -> bool {
712
- !self.bytes.is_empty() && self.char_all(|c| c.is_ascii_digit())
+ !self.bytes.is_empty()
713
+ && self.char_all(|c| GeneralCategory::of(c) == GeneralCategory::DecimalNumber)
714
}
715
716
#[pymethod(name = "__mod__")]
0 commit comments