Code blocks as parameters
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Tue May 1 16:31:20 EDT 2001
Tue, 1 May 2001 12:51:02 -0700, James_Althoff at i2.com <James_Althoff at i2.com> pisze:
> func(arg1,arg2) targ1,targ2:
> statements using targ1 and/or targ2
>
> which would turn into:
>
> def thunk(targ1,targ2):
> statements using targ1 and/or targ2
What if func returns a meaningful return value which I want to use?
Can this construct be used inside a subexpression?
I'm afraid that the syntax has problems in a general cas3, so I would
like to have at least
v = func(arg1, arg2) targ1, targ2:
statements
and
return func(arg1, arg2) targ1, targ2:
statements
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
More information about the Python-list
mailing list