Mercurial > fragmenty
changeset 6:3dcc0d9dfdd8
created
| author | 127.0.0.1 |
|---|---|
| date | Thu, 07 Oct 2010 23:24:58 +0200 |
| parents | c9160d2b5967 |
| children | 2554a94a0e0a |
| files | docs/Domkni%C4%99cia%20-%20Uwaga |
| diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/Domkni%C4%99cia%20-%20Uwaga Thu Oct 07 23:24:58 2010 +0200 @@ -0,0 +1,14 @@ +{{{#!python +>>> def get_lambdas(): +... lambdas = [] +... for l in ['A', 'B', 'C']: +... lambdas.append(lambda: l) +... +... return lambdas +... +>>> for l in get_lambdas(): +>>> print l() +C +C +C +}}} \ No newline at end of file
