This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Change the instruction pointer in python
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.2
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: exarkun, loewis, vinoth
Priority: normal Keywords:

Created on 2009-06-29 13:30 by vinoth, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unnamed vinoth, 2009-06-30 06:06
unnamed vinoth, 2009-06-30 15:24
Messages (6)
msg89833 - (view) Author: vinoth (vinoth) Date: 2009-06-29 13:30
HI all 

I am not the too technical guy, but thinking about the new way of
controlling the flow instead of throwing an error.

as of now if we need to break a control and go back exceptions helps,
but it is not a actual way. 

it would be great if we have a control over the frames execution, I mean

A  calls B calls C calls D 

at that point if we think to move directly to B (what error handler do
if that B has the handler defined of the error), changing the frames
instruction pointer to back to the B's position (in python code without
raising an exception) is a really useful for this web applications.

Please excuse me if we have this control already, (can u explain?)

Thanks 
Vinoth
msg89834 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2009-06-29 13:35
You're talking about adding a non-local goto feature to the language. 
This would be a huge change, and not one that is generally in the
direction that any widespread languages (let alone Python itself) are
going these days.

Please raise this on one of the mailing lists (python-list or
python-ideas), fill out all of the details of how this would work, build
some community support for the feature, write a PEP, and then submit the
PEP to python-dev for consideration.
msg89877 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-06-29 21:10
Actually, Python has non-local gotos already, and in a structured way:
by means of exceptions. I don't understand why it is "not a actual way"
- please do consider using a custom exception for that.
msg89908 - (view) Author: vinoth (vinoth) Date: 2009-06-30 06:06
I hope exceptions are not created for that purpose,and it is not the actual*
/*right way i hope. because,

if any of the called methods has the try: except: block, it fails..

and we can't guide other coders, "Don't use try: except:" as it is the
language neutral power.

But it is easy to implement.  Just do as we do in case of exception, but in
a user defined way. I hope.

Thanks
Vinoth

On Tue, Jun 30, 2009 at 2:41 AM, Martin v. Löwis <report@bugs.python.org>wrote:

>
> Martin v. Löwis <martin@v.loewis.de> added the comment:
>
> Actually, Python has non-local gotos already, and in a structured way:
> by means of exceptions. I don't understand why it is "not a actual way"
> - please do consider using a custom exception for that.
>
> ----------
> nosy: +loewis
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue6367>
> _______________________________________
>
msg89910 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-06-30 06:44
So there is a language feature there already that solves your problem
exactly, and you don't want to use it? Exceptions are *exactly* the
right way to provide non-local gotos in a structured manner.

I'm opposed to any change to the language because the desired feature is
already there. Use it. Don't tell that it is the wrong way, it is
exactly the right way.
msg89930 - (view) Author: vinoth (vinoth) Date: 2009-06-30 15:24
HI

Exceptions are doing exactly the right way. but what I am telling is a new
way of flow control which no languages currently having.

On Tue, Jun 30, 2009 at 12:14 PM, Martin v. Löwis <report@bugs.python.org>wrote:

>
> Martin v. Löwis <martin@v.loewis.de> added the comment:
>
> So there is a language feature there already that solves your problem
> exactly, and you don't want to use it? Exceptions are *exactly* the
> right way to provide non-local gotos in a structured manner.
>
> I'm opposed to any change to the language because the desired feature is
> already there. Use it. Don't tell that it is the wrong way, it is
> exactly the right way.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue6367>
> _______________________________________
>
History
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50616
2009-06-30 15:24:59vinothsetfiles: + unnamed

messages: + msg89930
2009-06-30 06:44:30loewissetmessages: + msg89910
2009-06-30 06:06:33vinothsetfiles: + unnamed

messages: + msg89908
2009-06-29 21:10:58loewissetnosy: + loewis
messages: + msg89877
2009-06-29 18:39:08benjamin.petersonsetresolution: rejected
2009-06-29 13:38:13r.david.murraysetstatus: open -> closed
2009-06-29 13:35:37exarkunsetnosy: + exarkun
messages: + msg89834
2009-06-29 13:30:39vinothcreate