Embedded Python and MySQLdb (was Re: PyApache and MySQLdb (was Re: anyone get one of the python apache modules to work with 2.1?))
Skip Montanaro
skip at pobox.com
Fri Aug 31 01:35:07 EDT 2001
Brandon> Ok, here's the revelation:
Brandon> (<class exceptions.AttributeError at 0x817b59c>, <exceptions.AttributeError instance at 0x818a04c>, <traceback object at 0x8189b38> )
Brandon> AttributeError = <class exceptions.AttributeError at 0x80c807c>
Brandon> exceptions.AttributeError = <class exceptions.AttributeError at 0x817b59c>
Brandon> Ie, exceptions.AttributeError and AttributeError don't match.
Brandon> All that has to happen to cause this is to import the
Brandon> exceptions module.
Hmmm... Works for me in 2.1.1:
% python
Python 2.1.1 (#11, Aug 30 2001, 10:35:23)
[GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import exceptions
>>> exceptions.AttributeError
<class exceptions.AttributeError at 0x80f217c>
>>> AttributeError
<class exceptions.AttributeError at 0x80f217c>
I checked the 2.1.1 code. It doesn't have a call to
_PyImport_FixupExtension after the init_exceptions call.
--
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/
More information about the Python-list
mailing list