[New-bugs-announce] [issue45930] Lambda function bug
Valery Lovchikov
report at bugs.python.org
Mon Nov 29 11:29:31 EST 2021
New submission from Valery Lovchikov <lvch at spb.edu>:
Python 3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f=[lambda x: y**x for y in [2,3]]
>>> f[0](2)
9
>>> f[1](2)
9
=============
I expected 4 as a result of f[0](2), but got 9
----------
messages: 407293
nosy: lvch
priority: normal
severity: normal
status: open
title: Lambda function bug
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45930>
_______________________________________
More information about the New-bugs-announce
mailing list