Retrieving Python Keywords

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Apr 9 22:07:13 EDT 2011


On Sun, 10 Apr 2011 03:28:10 +0200, candide wrote:

> Python is very good at introspection, so I was wondering if Python (2.7)
> provides any feature to retrieve the list of its keywords (and, as,
> assert, break, ...).

import keyword


-- 
Steven



More information about the Python-list mailing list