Proposed new syntax

Michael Torrie torriem at gmail.com
Fri Aug 11 10:45:14 EDT 2017


On 08/10/2017 11:29 PM, Steve D'Aprano wrote:
> On 2017年8月11日 12:54 pm, Mikhail V wrote:
>>> but at a first glance, "while" reads as "if" as in english.
>> In English the two words don't mean the same thing.
But actually in some contexts they really do seem to mean the same thing:
Make hay while the sun shines.
If it's sunny, make hay.
Essentially the same meaning, though we can argue whether "while"
implies some kind of long-running activity that the if does not.
Particularly people who are learning English may not even see the
difference between while and if as far as a logical statement, similar
to the ones above, goes.
>> That's why 
>> if foo:
> ...
>>> and 
>> while foo:
> ...
>>> are different.

In computer languages, sure. Spoken language is certainly not so clear cut.


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /