replacing `else` with `then` in `for` and `try`

Steve D'Aprano steve+python at pearwood.info
Sun Nov 5 19:06:34 EST 2017


On Mon, 6 Nov 2017 10:06 am, Jon Ribbens wrote:

> On 2017-11-05, Ben Finney <ben+python at benfinney.id.au> wrote:
>> Jon Ribbens <jon+usenet at unequivocal.eu> writes:
>>> I've provided you with a way of thinking about 'for...else' that makes
>>> its purpose and meaning intuitively obvious.
>>
>> I've read that sentence several times, and I still can't make it
>> anything but a contradiction in terms.
> 
> Well, keep at it and I'm sure you'll work it out eventually.


    Alice laughed. 'There's no use trying,' she said. 'One can't 
    believe impossible things.'

    'I daresay you haven't had much practice,' said the Queen. 
    'When I was your age, I always did it for half-an-hour a day.
    Why, sometimes I've believed as many as six impossible things
    before breakfast.'



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list