New submission from Samuel Ainsworth: If we construct a dict as follows,
x = {t: lambda x: x * t for t in range(5)} then `x[0](1)` evaluates to 4! Tested on 2.7 and 3.5. ---------- messages: 260287 nosy: Samuel.Ainsworth priority: normal severity: normal status: open title: lambda in dict comprehension is broken type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26361> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com