[issue41532] Import precedence is broken in some library
김진서
report at bugs.python.org
Wed Aug 12 12:43:17 EDT 2020
New submission from 김진서 <contact at kjsman.me>:
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 <report at bugs.python.org>
<https://bugs.python.org/issue41532>
_______________________________________
More information about the Python-bugs-list
mailing list