while (a=b()) ...

Andrew Clover esuzm at primrose.csv.warwick.ac.uk
Tue May 11 08:55:43 EDT 1999


Magnus L. Hetland (mlh at idt.ntnu.no) wrote:

> [Lots of stuff that has been debated to death several times already]

>>   c= a+b: (a= 1; b= 2)

> The use of a colon would probably make the parser very confused in
> structures like while and if, where the colon is already part of the
> syntax...

 Indeed. I was not suggesting it for Python specifically, just in general
as something I'd like to see. Being new to the group and having access to
only a limited archive of back postings, I hadn't seen this discussion
before. Personally I want to give Python big plaudits for allowing:

  (a, b)= (b, a)

 something which I always wanted a language to do. Now, if only I could
define a function in the form:

  foo= fn (x, y) to (print x+y; print x*y)

 I'd be happy. Well, relatively happy. Happier than with the current lambda
form syntax... I get the feeling I could be treading past ground again,
though... :-)

-- 
This posting was brought to you by And Clover.
(Sorry.)




More information about the Python-list mailing list