New submission from 김진서 <[email protected]>:
I found this behavior by chance:
>>> with open('tokenize.py', 'w') as f:
... f.write("print('This is so sad')")
...
>>> import linecache
This is so sad
>>>
path/of/python/Lib/linecache.py:
import functools
import sys
import os
import tokenize
[...]
Meanwhile,
>>> with open('functools.py', 'w') as f:
... f.write("print('This is so sad')")
...
>>> import linecache
>>>
It seems for me to be broken: 'import' doesn't have clear precedence.
----------
components: Library (Lib)
messages: 375262
nosy: contact
priority: normal
severity: normal
status: open
title: Import precedence is broken in some library
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41532>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com