[XML-SIG] Patches for PyXML-0.5.3 re single arg to list.append
Mark Favas
m.favas@per.dem.csiro.au
Mon, 28 Feb 2000 11:16:49 +0800
Recently, the CVS version of Python has been changed to flag as an error
usages of list.append() with more than one argument. (Previously,
multiple args were silently converted to a tuple.) The following two
patches fix this type of append() use for the released PyXML-0.5.3
(apologies if already fixed in XML CVS). Both occur in
xml/parsers/xmlproc.
*** dtdparser.py.orig Mon Feb 28 10:31:17 2000
--- dtdparser.py Mon Feb 28 10:33:00 2000
***************
*** 598,604 ****
self.scan_to(">")
self.skip_ws()
! cont_list.append(self.get_match(reg_name),"")
if sep=="|" and not self.now_at("*"):
self.report_error(3005,"*")
--- 598,604 ----
self.scan_to(">")
self.skip_ws()
! cont_list.append((self.get_match(reg_name),""))
if sep=="|" and not self.now_at("*"):
self.report_error(3005,"*")
*** xmlutils.py.orig Mon Feb 28 10:31:26 2000
--- xmlutils.py Mon Feb 28 10:32:15 2000
***************
*** 406,414 ****
# --- Internal methods
def _push_ent_stack(self):
!
self.ent_stack.append(self.get_current_sysid(),self.data,self.pos,\
!
self.line,self.last_break,self.datasize,\
!
self.last_upd_pos,self.block_offset,self.final)
def _pop_ent_stack(self):
(self.current_sysID,self.data,self.pos,self.line,self.last_break,\
--- 406,414 ----
# --- Internal methods
def _push_ent_stack(self):
!
self.ent_stack.append((self.get_current_sysid(),self.data,self.pos,
!
self.line,self.last_break,self.datasize,
!
self.last_upd_pos,self.block_offset,self.final))
def _pop_ent_stack(self):
(self.current_sysID,self.data,self.pos,self.line,self.last_break,\
Cheers,
Mark
--
Email - m.favas@per.dem.csiro.au Postal - Mark C Favas
Phone - +61 8 9333 6268, 041 892 6074 CSIRO Exploration &
Mining
Fax - +61 8 9333 6121 Private Bag No 5
Wembley, Western
Australia 6913