Python 1.5.2->2.0 undocumented incompat.?

Daniel Hops daniel.hops at eed.ericsson.se
Sun Oct 22 08:28:26 EDT 2000


I just installed the new Pyton 2.0 on my SUN Solaris machine and tried
my current script with it, but got an error.
Changing the 1st line of the script back to 1.5.2 binary helps.
The error is related with regular expression matching. I get an
attribute error: "None has no attribute group"
The only thing I do is dividing a html page with one main-table into 3
parts.
head,main,bottom =
list(all.match(html_page_string).group('head','main','bottom'))

And that is the precompiled r.e.:
all = re.compile
("(?P<head>\A.*?</TR>\s+)(?P<main>.*?)(?P<bottom></TABLE>(?!.*</TABLE>).*)",
re.S)

Does anyone know what is the cause for this error?

Regards
Daniel Hops





More information about the Python-list mailing list