Message120938
The token module appears to be designed to be used with import *. In fact it is used this way in the tokenize module. However it does not define __all__ and as a result, from token import * leaks symbol "main":
>>> import tokenize
>>> tokenize.main.__module__
'token'
Attached patch adds token.__all__ and "modernizes" generation of the tok_name dictionary.
I also renamed main to _main because it is hard to imagine that any user code would ever want to use it. |
|
Date |
User |
Action |
Args |
2010-11-11 04:08:44 | belopolsky | set | recipients:
+ belopolsky |
2010-11-11 04:08:44 | belopolsky | set | messageid: <1289448524.33.0.684332419929.issue10386@psf.upfronthosting.co.za> |
2010-11-11 04:06:52 | belopolsky | link | issue10386 messages |
2010-11-11 04:06:52 | belopolsky | create | |
|