calling __init__ more than once?

Roy Smith roy at panix.com
Sun Sep 2 20:46:58 EDT 2001


"Emile van Sebille" <emile at fenx.com> wrote:
> One thing you could try is to restructure slightly, passing the filename on
> initialization:
> 
> stuff1 = myParser(fileName1)
> stuff1.parse()
> stuff2 = myParser(fileName2)
> stuff2.parse()

I was trying to avoid that, since it meant instantiating a new parser 
object for each file I wanted to parse.  On the other hand, that make 
actually make more sense!



More information about the Python-list mailing list