New syntax for blocks
python at mrabarnett.plus.com
Tue Nov 17 18:31:18 CET 2009
Jonathan Saxton wrote:
> On Thu, 12 Nov 2009 21:27:31 +0100, Bruno Desthuilliers wrote:
>>> Congratulations, you just reinvented one of the most infamous
>>> other languages. Believe it or not, but not allowing this in
>>> Python was a very deliberate design choice.
>> Oh, but those hundreds of thousands of man-hours lost to bugs
>> caused by assignment-as-an-expression is nothing compared to the
>> dozens of man- minutes saved by having one fewer line of code!
> And if I ever find the genius who had the brilliant idea of using =
> to mean assignment then I have a particularly nasty dungeon reserved
> just for him. Also a foul-smelling leech-infested swamp for those
> language designers and compiler writers who followed his example.
> (Come to think of it, plagiarizing a bad idea is probably the worse
C was derived from BCPL, which used ":=" and "=".
Fortran uses "=" and ".EQ.", probably because (some) earlier autocodes
It's a pity that Guido chose to follow C.
More information about the Python-list