Working around a lack of 'goto' in python
Joe Mason
joe at notcharles.ca
Tue Mar 9 11:57:52 EST 2004
In article <c718a6cf.0403090836.564f690b at posting.google.com>, Y2KYZFR1 wrote:
>> > Step away from the computer slowly . . .
>> >
>> > There is absolutely NO LEGITIMATE REASON to use GOTO in any modern
>> > language, ESPECIALLY Python, EVER!
>> >
>> > No stay away from computers until you understand how and why this is.
>>
>>
>> Bull. I've used goto's in similar cases as those presented. I have
>> found that in the right cases they are quite readable. Never had a
>> problem with them when used like this.
>>
>> So you didn't answer the question, how would you do this clearly in
>> Python?
>>
>
> same way you would do it in any other OBJECT ORIENTED language. Use
> the appropriate pattern.
Which would be what? (No, it's not exceptions. Stay away from this
thread until you understand why it's not.)
Joe
More information about the Python-list
mailing list