calling __init__ more than once?

Roy Smith roy at
Mon Sep 3 02:46:58 CEST 2001

"Emile van Sebille" <emile at> 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