Fred Drake | 295da24 | 1998-08-10 19:42:37 +0000 | [diff] [blame] | 1 | \section{\module{keyword} --- |
Fred Drake | bbac432 | 1999-02-20 00:14:17 +0000 | [diff] [blame] | 2 | Testing for Python keywords} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 3 | |
Fred Drake | bbac432 | 1999-02-20 00:14:17 +0000 | [diff] [blame] | 4 | \declaremodule{standard}{keyword} |
Fred Drake | 295da24 | 1998-08-10 19:42:37 +0000 | [diff] [blame] | 5 | \modulesynopsis{Test whether a string is a keyword in Python.} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 6 | |
Fred Drake | db12f34 | 1997-10-06 21:39:16 +0000 | [diff] [blame] | 7 | |
| 8 | This module allows a Python program to determine if a string is a |
Fred Drake | 744f67f | 2002-01-24 16:38:53 +0000 | [diff] [blame^] | 9 | keyword. |
Fred Drake | db12f34 | 1997-10-06 21:39:16 +0000 | [diff] [blame] | 10 | |
| 11 | \begin{funcdesc}{iskeyword}{s} |
| 12 | Return true if \var{s} is a Python keyword. |
| 13 | \end{funcdesc} |
Fred Drake | 744f67f | 2002-01-24 16:38:53 +0000 | [diff] [blame^] | 14 | |
| 15 | \begin{datadesc}{kwlist} |
| 16 | Sequence containing all the keywords defined for the interpreter. If |
| 17 | any keywords are defined to only be active when particular |
| 18 | \module{__future__} statements are in effect, these will be included |
| 19 | as well. |
| 20 | \end{datadesc} |