ANNOUNCE: 'goto' for Python

pxlpluker pxlpluker at cfl.rr.com
Sun Apr 4 15:00:46 EDT 2004


Hi Richie,
If i am reading the docs right we can only goto/comefrom within the same 
"container" that goto is defined in. I see it as a way to skip sections 
of code based on earlier decisions. If i am right i sure could have used 
this 2 weeks ago. I am a python noob and I eventually just set a "skip 
this" flag with an if statement.

Richie Hindle wrote:

>[Tim]
>  
>
>>Guido has already accepted your module for inclusion in Python 2.4, and I
>>expect he'll use his time machine then to ensure that it's always been part
>>of Python.
>>    
>>
>
>Great!  That will have saved me a lot of work, once the new time-line
>comes into effect.  I can re-use the time for the next job - enhancing
>Python's parser to allow Duff's Device.
>
>  
>
>>[Explanation of numeric labels snipped]
>>Your introduction of alphanumeric labels to Python is already far advanced.
>>    
>>
>
>Ah, OK, good.  I won't have to re-learn anything when the new feature goes
>into Python 0.1.
>
>  
>
>>I must say, though, that the restriction to 5 digits in Fortran had the nice
>>Pythonic effect of discouraging a subroutine from containing more than a
>>hundred thousand branch targets
>>    
>>
>
>That's a good point, but not really applicable here.  I haven't limited
>the number of labels, partly because I don't want any B&D to the feature,
>and partly because alphanumeric labels ought to be more differentiable
>than numeric ones.
>
>  
>
>>Full speed ahead!
>>    
>>
>
>Or backwards, or in fact to pretty much anywhere!
>
>  
>






More information about the Python-list mailing list