Passing data out of a Sax parser
John J. Lee
jjl at pobox.com
Mon Sep 22 12:57:41 CEST 2003
"Andrew Dalke" <adalke at mindspring.com> writes:
> > > if name == "spam":
> > > self.count += 1
> John J. Lee:
> > Works, but integers aren't mutable.
> I assume you refer to the snippet I posted above?
> Since it works, I don't understand the need for
> your comment.
It was just a nit: you said (indirectly) that integers are mutable:
| Either that or have startDocument create the mutable object, as
| self.count = 0
| self.count += 1
More information about the Python-list