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 terry.reedy
Recipients prasechen, steven.daprano, terry.reedy
Date 2020-09-18.23:09:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600470562.39.0.424476919572.issue41770@roundup.psfhosted.org>
In-reply-to
Content
I carefully redid your test, corrected, 3 times, and it works as expected.
Win 10, 3.9.0rc2.  

>>> import a.tem3 as t
>>> t.b
Traceback (most recent call last):
  File "<pyshell#23>", line 1, in <module>
    t.b
AttributeError: module 'a.tem3' has no attribute 'b'

# Add 'b = 2' to a/tem3.py and save.

>>> import sys
>>> del sys.modules['a.tem3']
>>> import a.tem3 as t
>>> t.b
2

Without seeing exactly what you did and when, I can only guess that you imported a version of xxx without the 'b' binding.  I once added it but *forgot to save* before re-importing.  Note that dictionary deletion and importing are well tested operations, so that bugs in normal imports are very unlikely.  If you really get a failure, there must be some relevant details that you have omitted, like importing from a remote system that is locally cached, with the local cache unchanged by editing the remote original.  Or having an OS bug such that saving a file does not update the 'last changed' time. 

If you disagree with a closing, please request re-opening and give us a chance to reproduce and discuss first rather than doing so yourself.
History
Date User Action Args
2020-09-18 23:09:22terry.reedysetrecipients: + terry.reedy, steven.daprano, prasechen
2020-09-18 23:09:22terry.reedysetmessageid: <1600470562.39.0.424476919572.issue41770@roundup.psfhosted.org>
2020-09-18 23:09:22terry.reedylinkissue41770 messages
2020-09-18 23:09:21terry.reedycreate