The symbol module

This module contains a listing of non-terminal symbols from the Python grammar. It’s probably only useful if you’re dabbling with the parser module.

Example: Using the symbol module
# File: symbol-example-1.py

import symbol

print "print", symbol.print_stmt
print "return", symbol.return_stmt

print 268
return 274
 

[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.00s 2012-05-25 19:09:20.222195. hosted by webfaction.