This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jinseo.kim
Recipients jinseo.kim
Date 2020-08-12.16:43:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597250597.2.0.528794904808.issue41532@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-08-12 16:43:17jinseo.kimsetrecipients: + jinseo.kim
2020-08-12 16:43:17jinseo.kimsetmessageid: <1597250597.2.0.528794904808.issue41532@roundup.psfhosted.org>
2020-08-12 16:43:17jinseo.kimlinkissue41532 messages
2020-08-12 16:43:17jinseo.kimcreate