exiting a while loop
Grant Edwards
grant.b.edwards at gmail.com
Sat May 23 11:10:29 EDT 2020
On 2020-05-22, DL Neil via Python-list <python-list at python.org> wrote:
> On 23/05/20 4:31 AM, Grant Edwards wrote:
>> On 2020-05-22, Peter Otten <__peter__ at web.de> wrote:
>>
>>> If you want to terminate the script you can use exit. However exit
>>> is a function, and you have to call it
>>>
>>> exit()
>>
>> <pedantic>
>>
>> Actually it's an instance of _sitebuiltins.Quitter not a function.
>>
>> You still have to call it. ;)
>>
>> </pedantic>
> Which definition (may) make it 'worse' (when compared with "break"):
Oh, he definitely wanted break instead of exit(), and I assume the OP
had already taken that advice.
That's why I'm claiming extra pedant points: clarifying a pointless
detail about something the OP didn't want to be using in first place
and which had already been replaced by something else.
--
Grant
More information about the Python-list
mailing list