New submission from Alexander Belopolsky <belopol...@users.sourceforge.net>:
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. ---------- components: Library (Lib) files: token-all.diff keywords: patch messages: 120938 nosy: belopolsky priority: normal severity: normal stage: patch review status: open title: token module should define __all__ versions: Python 3.2 Added file: http://bugs.python.org/file19568/token-all.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10386> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com