[Python-bugs-list] [ python-Bugs-456176 ] add dictionary "tokens" to token.py

noreply@sourceforge.net noreply@sourceforge.net
Thu, 30 Aug 2001 13:24:28 -0700


Bugs item #456176, was opened at 2001-08-28 08:48
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=456176&group_id=5470

Category: Python Library
Group: Feature Request
>Status: Deleted
>Resolution: Duplicate
Priority: 5
Submitted By: Grant Griffin (dspguru)
Assigned to: Nobody/Anonymous (nobody)
>Summary: add dictionary "tokens" to token.py

Initial Comment:
I would like for token.py to provide a dictionary, 
called "tokens" that maps the name of each token to 
its value, e.g.:

   token.tokens[token.INDENT] is 'INDENT'

This would be useful for debugging programs that use 
tokenize.

A user currently could create a dictionary like this 
using introspection on token.py (assuming tokens are 
in all caps) but that's a lot of trouble.  Instead, I 
believe it would be better to solve the problem once-
and-for-all by building the extra logic required to 
create the dictionary into token.main.

thanks much,

=g2


----------------------------------------------------------------------

Comment By: Grant Griffin (dspguru)
Date: 2001-08-28 08:52

Message:
Logged In: YES 
user_id=70844

Sorry!  This is a duplicate of the previous one.  Please 
delete it.

darn-them-browsers-ly y'rs

=g2

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=456176&group_id=5470