Retrieving Python Keywords

Terry Reedy tjreedy at
Sun Apr 10 20:13:03 CEST 2011

On 4/10/2011 5:12 AM, candide wrote:
> Le 10/04/2011 04:01, Terry Reedy a écrit :
>> Yes. (Look in the manuals,

> I did : my main reference book is the Martelli's /Python in a Nutshell/

You should only use that as a supplement.

> and the index doesn't refer to the keyword import

and now you know why ;-).

I meant the fine, heavily edited and constantly improved by 20+ people 
manuals that come with Python. The Global Module Index has one entry 
under K -- the keyword module. The General Index has multiple entries 
for 'keyword', including 'keyword(module)'.

>> or try the obvious imports ;-)

I meant, 'import keyword' or 'import keywords'.
Sorry, I guess perhaps not so obvious if one is not used to Python's 
extreme introspection features.

Terry Jan Reedy

More information about the Python-list mailing list