python 3's adoption

Steve Holden steve at holdenweb.com
Wed Jan 27 05:19:35 EST 2010


Paul Rubin wrote:
> 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?

Remember that Guido stated (I think in the original FAQ entry for why
assignments don't produce results, but I could be wrong) that he
explicitly wanted Python to be a statement-based language.

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010  http://us.pycon.org/
Holden Web LLC                 http://www.holdenweb.com/
UPCOMING EVENTS:        http://holdenweb.eventbrite.com/




More information about the Python-list mailing list