A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-January/012114.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test test___all__.py,1.3,1.4

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test test___all__.py,1.3,1.4Skip Montanaro skip@mojam.com (Skip Montanaro)
Wed, 24 Jan 2001 00:28:21 -0600 (CST)
    Guido> I think I saw a complaint about this that specifically said that
    Guido> when dbhash is imported when bsddb can't be imported, an
    Guido> incomplete dbhash is left behind in sys.modules, and then a
    Guido> second import of dbhash will succeed -- but of course it will
    Guido> define no objects.

So it does:

    % ./python
    Python 2.1a1 (#2, Jan 23 2001, 23:30:41) 
    [GCC 2.95.3 19991030 (prerelease)] on linux2
    Type "copyright", "credits" or "license" for more information.
    >>> import dbhash
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "/home/beluga/skip/src/python/dist/src/Lib/dbhash.py", line 3, in ?
	import bsddb
    ImportError: No module named bsddb
    >>> import dbhash
    >>>

Can that be construed as a bug?  If import fails, shouldn't the stub module
that was inserted in sys.modules be removed?

Skip



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4