[Tutor] Object attributes surviving deletion

John Fouhy john at fouhy.net
Fri Jun 27 01:15:37 CEST 2008


On 27/06/2008, Kent Johnson <kent37 at tds.net> wrote:
> No, the assignment
>   gram.database = {}
>  will always (at least absent any extra magic) create an instance attribute.

I think this is the OP's workaround.  Quoting:

"Shrutarshi Basu":
> I have to manually clear gram.database because
> otherwise it keeps the data from previous calls to that function.

I think the OP is asking why this step is necessary.

-- 
John.


More information about the Tutor mailing list