On 9 Mar 2005 10:05:21 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Maybe this can help:
value = d.get('x', lambda: bigscaryfunction())
...def test(): print 'gbye'd = {} z = d.get('x', lambda: test()) z<function <lambda> at 0x008D6870>
So this seems to be merely an obfuscation of:
z = d.get('x', test) z<function test at 0x008D66B0>
I just wanted to ask, am I missing something?
Nope that looks right. See "Overuse of lambda" in http://www.python.org/moin/DubiousPython for discussion of exactly this mistake.
STeVe -- http://mail.python.org/mailman/listinfo/python-list