Attila Szabo wrote:
2005, Feb 25 -> Scott David Daniels wrote :
Attila Szabo wrote:
>>...lambda x: 'ABC%s' % str(x) ...
OK, to no real effect, in main you define an unnamed function that
you can never reference. Pretty silly, but I'll bite.
This code was simplified, the lambda was part of a m
2005, Feb 25 -> Scott David Daniels wrote :
> Attila Szabo wrote:
> >Hi,
> >def main():
> >lambda x: 'ABC%s' % str(x)
> >for k in range(2): exec('print %s' % k)
> OK, to no real effect, in main you define an unnamed function that
> you can never reference. Pretty silly, but I'll bi
"Attila Szabo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I wrote this sample piece of code:
>
> def main():
>lambda x: 'ABC%s' % str(x)
>for k in range(2): exec('print %s' % k)
>
> main()
>
> With the lambda line, I get this:
> SyntaxError: unqualified
Attila Szabo wrote:
Hi,
def main():
lambda x: 'ABC%s' % str(x)
for k in range(2): exec('print %s' % k)
OK, to no real effect, in main you define an unnamed function that
you can never reference. Pretty silly, but I'll bite.
Next you run run a loop with exec looking like you think i