Passing data out of a Sax parser

John J. Lee jjl at pobox.com
Mon Sep 22 06:57:41 EDT 2003


"Andrew Dalke" <adalke at mindspring.com> writes:

> Me:
> > >     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
[...]


John




More information about the Python-list mailing list