CVS: 'python/dist/src/Lib keyword.py'
Guido van Rossum
guido@monty.CNRI.Reston.Va.US
Thu, 20 Mar 1997 11:45:53 -0800
Update of /projects/cvsroot/python/dist/src/Lib
In directory monty:/usr/people/guido/python/src/Lib
Modified Files:
keyword.py
Log Message:
Ka-Ping Yee's version is better:
Here's a "keyword" module which, in the spirit of "token.py", updates
the list of keywords automatically from a source file (in this case,
"graminit.c" seemed like a reasonable choice, easier than "Grammar/Grammar").
You get "kwlist", a sorted list of keywords; "kwdict", a dictionary
mapping each keyword to 1; and "iskeyword", a function which tells
you if a given string happens to be a keyword.
--Guido van Rossum (home page: http://www.python.org/~guido/)