Eryk Sun added the comment: There's something wrong with however you're testing this.
>>> s = '\N{infinity}' >>> s == '∞' == '\u221e' True '∞' isn't numeric. It's a math symbol (Sm): >>> unicodedata.category(s) 'Sm' >>> s.isdecimal() False >>> s.isdigit() False So float('∞') should raise a ValueError: >>> float(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: could not convert string to float: '∞' ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27412> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com