xml.dom's weirdness?

Lie Lie.1296 at gmail.com
Sat Jul 26 01:15:04 EDT 2008


Why this generates AttributeError, then not?

Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml
>>> xml.dom
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'dom'
>>> xml.dom
<module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'>
>>>



More information about the Python-list mailing list