python "jump" or "goto" commands?
Michael Hudson
mwh at python.net
Thu May 31 19:26:33 EDT 2001
Thomas Wouters <thomas at xs4all.net> writes:
> On Wed, May 30, 2001 at 03:14:44PM -0700, eric_brake wrote:
>
> > I'd like to know if python has commands similar to "jump" or "goto".
>
> Nope. _Technically_, the bytecode support is available (because it's
> necessary for some other constructs), but there is no way to emit that
> bytecode in Python code.
Tricky, though; blocks get in the way. So you couldn't reasonably do this:
goto bob
label bab
for i in l:
label bob
goto bab
or for try/except/finally blocks. Not that this is relavent to, well,
anything, really...
Cheers,
M.
--
... so the notion that it is meaningful to pass pointers to memory
objects into which any random function may write random values
without having a clue where they point, has _not_ been debunked as
the sheer idiocy it really is. -- Erik Naggum, comp.lang.lisp
More information about the Python-list
mailing list