Insertin **keywords into a class

Fredrik Lundh fredrik at pythonware.com
Tue Mar 20 18:24:19 EST 2001


I wrote:
> and here you're attempting to update a non-existent
> attribute called "kw".  I assume you get an Attribute-
> Error...

duh.  the bot's embedded interpreter messed up.  after reboot, I
realized that you were probably hoping that Python should, some-
how, figure out that the first "kw" in this statement

    self.kw = keywords[kw]

would expand to the current value of the "kw" variable (are you by any
chance an ex-Tcl hacker?)

the rest of my answer appears to be correct, though.

sorry for the confusion.

Cheers /F





More information about the Python-list mailing list