C-like assignment expression?
cokofreedom at gmail.com
cokofreedom at gmail.com
Wed May 21 11:22:36 EDT 2008
On May 21, 4:57 pm, "inhahe" <inh... at gmail.com> wrote:
> one of the few things i miss from C is being able to use assignment in
> expressions. that's the only thing, really.
> also there's no switch/case, you have to use a dictionary of functions
> instead, although i rarely need that, usually i just use elif.
One thing I hate from C is the assignment in expressions...Forcing
myself to write
0 == Something
rather than
Something == 0
just to make sure I was mistakenly assigning values in statements is
annoying, it ruins the ease of reading.
I kind of agree with the select:case, but I think a key issue is how
to implement it. Elif is reasonable for now.
Diez, true I guess, but then we haven't seen what these expressions
are, and why there has to be three.
More information about the Python-list
mailing list