On Thu, Feb 1, 2018 at 12:44 AM, Victor Stinner
<victor.stin...@gmail.com> wrote:
> I like the idea of str.isdigit(ascii=True): would behave as
> str.isdigit() and str.isascii(). It's easy to implement and likely to
> be very efficient. I'm just not sure that it's so commonly required?
>
> At least, I guess that some users can be surprised that str.isdigit()
> is "Unicode aware", accept non-ASCII digits, as int(str).

I disagree; the whole point of "isdigit" is that it catches every
digit. If you want to check against a specific (and small) set of
characters, just use set operations.

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to