Invoking return through a function?

Alberto Riva alb at nospam.chip.org
Tue Oct 31 22:35:32 EDT 2017


On 10/31/2017 11:01 AM, Rhodri James wrote:
> On 31/10/17 02:06, Alberto Riva wrote:
> 
> Steve D'Aprano gave you a pretty full answer, I just wanted to add:
> 
>>  The kind of
>> statement I was trying to add would at least have made that explicit: 
>> return-if-so-and-so-happens.
> 
> That's only obvious in the function that's doing the returning.  The 
> function that's doing the calling that gets its expectation of flow 
> control broken has no clue, and that's my problem.

Sorry, I wasn't clear: I meant that the function that's doing the 
returning should be called "return-if-so-and-so-happens", literally ;) 
So when it appears in the body of another function, it's clear that it 
*may* invoke a return. Not saying it's a good idea, but just that when 
you read something like that you can expect evaluation flow to be disrupted.

Again: I'm not saying it's a good idea, please don't take this as a 
serious feature request :)

Alberto



-- 
                 E-mail address:
((lambda (s a b c) (map 'string #'code-char (mapcar (lambda (v)
(setq s (+ a (mod (+ s v (- a)) b)))) (map 'list (lambda (v)
(- (char-code v) c)) " 1`-THUZ&+Wh1")))) 97 46 73 32)



More information about the Python-list mailing list