New submission from Peter Inglesby:

A script called token.py that imports anything that ends up importing tokenize, 
such as logging, triggers the following error when the script is run:

$ cat token.py 
import tokenize
$ python3 token.py
Traceback (most recent call last):
  File "token.py", line 1, in <module>
    import tokenize
  File 
"/usr/local/Cellar/python3/3.4.0/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py",
 line 38, in <module>
    __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding",
AttributeError: 'module' object has no attribute '__all__'

----------
messages: 222386
nosy: inglesp
priority: normal
severity: normal
status: open
title: Cannot import anything that imports tokenize from script called token.py
versions: Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21924>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to