GoTo considered missing

Dave Kuhlman dkuhlman at rexx.com
Wed Jul 3 17:18:15 EDT 2002


David LeBlanc wrote:

>>
>>     OK. I'm a spaghetti-coder from way back, new to Python.
>> I didn't even realize there was no "goto" till I tried to rewrite
>> a big C program in Python.
>>

[snip]

> 
> Care to share what you're working on? It might be that you're
> using "basic think" and not considering Python's advanced
> features.
> 

Right.  And, the *really* lazy among us would wrap that sucker with 
SWIG, declare victory, and go home.

Seriously, one of the important features of Python is that we can 
turn C and C++ code into modules that can be imported by Python.  
Advantages are (1) avoid debugging by reusing code that is already 
debugged, (2) retain the speed of C/C++ code, (3) avoid a laborious 
and error prone re-write.

OK, you already new all that.  But, it good to remind ourselves, 
especially in the face of someone who is re-writing C code.

Why is the OP re-writing that C code?  As a learning excercise, 
perhaps.  If not, then hand-coded or SWIG generated wrappers are 
something that should be considered.

  - Dave



-- 
Dave Kuhlman
dkuhlman at rexx.com
http://www.rexx.com/~dkuhlman




More information about the Python-list mailing list