A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-July/067188.html below:

[Python-Dev] xml issue in 2.5

[Python-Dev] xml issue in 2.5 [Python-Dev] xml issue in 2.5"Martin v. Löwis" martin at v.loewis.de
Mon Jul 10 08:09:22 CEST 2006
Neal Norwitz wrote:
> http://python.org/sf/1513611
> xml.sax.ParseException weirdness in python 2.5b1.  The following code
> doesn't work:
> 
> from xml.sax import make_parser, SAXParseException
> 
> parser = make_parser()
> try:
>    parser.parse(StringIO('invalid'))
> except SAXParseException:
>    print 'caught it!'
> 
> Any comments?

The problem can be simplified to this:

py> import xml.sax,xmlcore.sax,sys
py> sys.modules['xml.sax'] is sys.modules['xmlcore.sax']
False

One way to fix this would be to never refer to "xmlcore"
explicitly (i.e. import from xml.sax._exceptions in
expatreader), but I guess that would defeat the purpose
of the xmlcore renaming.

Regards,
Martin
More information about the Python-Dev mailing list

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