what is wrong with this line? while (line = workfile.readlin

Sean 'Shaleh' Perry shaleh at valinux.com
Tue May 22 16:35:20 EDT 2001


On 22-May-2001 erudite wrote:
> Thank you all for your responses. Question though. Is there some sort of
> advantage to not allowing statements where a expressions is expected?
> 

For one it kills a whole group of related oops'.

if (foo = func()) v. if (foo == func()).  Which one did you mean?  No more
using '=' where you meant '=='.

It also makes it harder for people to hide important code steps in control
loops and therefore having easier to read code.




More information about the Python-list mailing list