Assignment and comparison in one statement
Johannes Bauer
dfnsonfsduifb at gmx.de
Sat May 24 07:13:08 EDT 2008
George Sakkis schrieb:
>> However, this "assignment and comparison" is not working. What's the
>> "Python way" of doing this kind of thing?
>
> The most obvious and readable of course: use two statements, as one
> should do regardless of the language, instead of resorting to error-
> prone hacks.
As I said in the reply to Carl, this might be okay for if-clauses, but
is bothering me with while-loops.
Regards,
Johannes
--
"Wer etwas kritisiert muss es noch lange nicht selber besser können. Es
reicht zu wissen, daß andere es besser können und andere es auch
besser machen um einen Vergleich zu bringen." - Wolfgang Gerber
in de.sci.electronics <47fa8447$0$11545$9b622d9e at news.freenet.de>
More information about the Python-list
mailing list