__getattr__ weirdness

Greg Brunet gregbrunet at NOSPAMsempersoft.com
Fri Aug 22 14:33:50 EDT 2003


I've figured out one thing: that be re-arranging the __init__ code
assignments (and adding one that was placed later in code I snipped
out), I am able to get the extra _ga calls to stop a lot earlier.  This
code:

#----------------------------------------
    def __init__(self,filename):
        print '** __init__'
        self._rec=[]
        self._fldNames=[]
        self._filename=filename
        self._del=' '
        self._dirty=False
        self._open=False
        self._recno = 1

... by assigning _rec & _fldNames first, gets the repeated _ga calls to
stop after the first assignment following those two assignments.  I'm
still at a loss as to why _ga is being called all these times to begin
with though!  I'm only assigning values, not requesting them!  Thanks,

-- 
Greg





More information about the Python-list mailing list