Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49278

Re: Is this PEP-able? fwhile

Date 2013-06-26 23:11 +0300
From Jan Riechers <janpeterr@freenet.de>
Subject Re: Is this PEP-able? fwhile
References <8D03FD9C062D3C9-1864-1CD1D@webmail-m103.sysops.aol.com> <CAA=1kxRh2fsRST3OCyqhV+_7bC8WSUuvftsA1-4T_L2nzwXJ7A@mail.gmail.com> <E60FFA07-4A35-479C-ACA9-4A6712C20217@mac.com>
Newsgroups comp.lang.python
Message-ID <mailman.3903.1372279248.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 26.06.2013 16:28, William Ray Wing wrote:
> On Jun 26, 2013, at 7:49 AM, Fábio Santos <fabiosantosart@gmail.com
> <mailto:fabiosantosart@gmail.com>> wrote:
>>
>> On 26 Jun 2013 11:45, <jimjhb@aol.com <mailto:jimjhb@aol.com>> wrote:
>> >
>> > On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote:
>> > > In my experience the sorts of people who preach "one exit point" are
>> > > also all about defining preconditions and postconditions and proving
>> > > that the postconditions follow from the preconditions.  I think that
>> > > the two are linked, because the "one exit point" rule makes those
>> > > sorts of proofs simpler.
>> >
>> > Ah! utopia!
>> >
>> > For every one who knows about pre/post/invariant conditions, there
>> are 10 who follow goto-statement-is-harmful like a religious edict.
>> >
>> >
>> >
>> > I just checked and MISRA-C 2012 now allows gotos in specific,
>> limited circumstances.  I think it was the MISRA-C 1998 standard that
>> caused all this trouble.  So if MISRA now allows goto, why not
>> Python????  :)
>> >
>>
>> What is the matter? Just use the goto module...
>>
>>
>
> Wondered when that would be mentioned.
>
> Personally, I've never found that much use for GoTo, but as old timers
> know, that same module adds the Come_From entry point, which is
> priceless.  ;-)
>
> Bill
>
>


Actually, jumping to any place a program (I know it from QBasic :) ) is 
some kind of voodoo.

At first it seems that any function calling itself or calling another 
function from another function solves the "goto" puzzle - called OO 
programming, objects in space and inheritance?

But at 2nd glimpse, jumping in any place of code (function) or routine, 
at a given place precisely - and to avoid any checks and unrelated code 
which might occur on a regular function call and without the need to 
provide additional arguments - that's kinda cool (if variables are in 
scope by the target statements :) )

That's somehow how I remember it.

But I guess if everything should run as in a factory, one entrance, one 
component, one result and independently from each other (isolated) and 
on many cores and such, a goto without argument passing or state 
variables might just end up in a big mess.

What do you think?


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Is this PEP-able? fwhile Jan Riechers <janpeterr@freenet.de> - 2013-06-26 23:11 +0300

csiph-web