list comprehensions value assignment syntax error

Gerrit Holl gerrit at nl.linux.org
Wed Jan 8 10:03:00 EST 2003


Steve Holden schreef op woensdag  8 januari om 01:36:49 +0000:
> > I am trying to assign to a list item using list comprehensions, but this
> > raises a SyntaxError:
> 
> You've been around this group long enough to know where to consult the FAQ,

I am really sorry about this one. I did consult the FAQ but only on 'list
comprehensions', so I did not find number 6.30:

http://www.python.org/cgi-bin/faqw.py?req=show&file=faq06.030.htp
"Why can't I use an assignment in an expression?"...

I did not realise my questien was really about this and not about list
comprehensions. I should have been able to identify my problem as being
this; I should have thought harder before posting to the list, sorry.

I hope you can forgive me <w> ;),
yours,
Gerrit.

-- 
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/





More information about the Python-list mailing list