crazy lambdas

Johann Hibschman johann at physics.berkeley.edu
Tue Feb 13 22:23:02 EST 2001


Dan Parisien writes:
> those who use lambdas alot will notice my mistake. I, however, do not know 
> what I am doing wrong. I think it has something to do with the fact 'del 
> d[p]' doesn't have a value...

Yep.  "del d[p]" is a statement, not an expression.  Take a look at
the built-in function delattr.  That should do what you want.

--J

-- 
Johann Hibschman                           johann at physics.berkeley.edu



More information about the Python-list mailing list