inline assignments in conditionals
Michael Gilfix
mgilfix at eecs.tufts.edu
Sat Apr 27 16:43:35 EDT 2002
I think this example is backwards. Today is the variable. I'd
usually say: "If today is Sunday, I'm going to go shopping". So much
for that :)
-- Mike
On Sat, Apr 27 @ 22:37, Laura Creighton wrote:
> Jeremy:
> [snip]
> > Writing things that way is really unnatural, at least for English
> > speakers. It makes the intent of the code harder to understand (at
> > least for me). For example, if you were talking to a friend, you
> > wouldn't say:
> >
> > "If today is Sunday, I'm going to go shopping"
> >
> > but rather:
> >
> > "If Sunday is today, I'm going to go shopping"
>
> Interesting. I would never use the second construct, and I use the
> first one all the time. I wonder if this is a difference between
> people whose first language is English, and some for whom it was not.
> I don't think that anybody has had any trouble understanding me when I
> say 'If today is Saturday, then we are going to the concert house,
> otherwise we are going to hack.' But then I have been writing
> if 0 == x for a long time as well. (It was great -- Borodin Quartet
> playing Sjostakovitj and Beethoven, by the way.)
>
> Laura Creighton
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
`-> (lac)
--
Michael Gilfix
mgilfix at eecs.tufts.edu
For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html
More information about the Python-list
mailing list