python 3's adoption

Paul Rubin no.email at nospam.invalid
Wed Jan 27 03:36:52 EST 2010


Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> writes:
> Without becoming a purely functional language, you won't get rid of all 
> statements. 

Why not?  GCC lets you use any statement in an expression:

    #include <stdio.h>

    main()
    {
      int i, x, p=0;
      x = ({ for (i=1; i<=10; i++) p += i; p;});
      printf ("x=%d\n", x);
    }

and C is certainly not a purely functional language.

> for, while, if, try, break, yield, return
> are all used for flow control, and should remain as statements. 

What about assert, import, and pass?



More information about the Python-list mailing list