Skip to content

Commit d69df4b

Browse files
committed
gh-106318: Add example for str.isascii()
1 parent fb1cb00 commit d69df4b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Doc/library/stdtypes.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,19 @@ expression support in the :mod:`re` module).
19981998
``False`` otherwise.
19991999
ASCII characters have code points in the range U+0000-U+007F.
20002000

2001+
For example::
2002+
2003+
>>> 'a commom word'.isascii()
2004+
True
2005+
>>> 'acommomword'.isascii()
2006+
True
2007+
>>> 'µ'.isascii()
2008+
False
2009+
>>> 'æ'.isascii()
2010+
False
2011+
>>> 'Ŧ'.isascii()
2012+
False
2013+
20012014
.. versionadded:: 3.7
20022015

20032016

0 commit comments

Comments
 (0)