On May 12, 7:35 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Ohad Frand" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | I am looking for a way to programmically get a list of all python
> | existing statements that I cannot access by __builtins__ or locals()
> | (like ["assert","break","class",...])
>
> You appear to want the keywords that begin statements.  Look at the keyword
> list in the language reference and pick those you want.  Then build that
> list into your program.

Someone already did it:

import keyword
print keyword.kwlist

George
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to