break LABEL vs. exceptions + PROPOSAL

Discussion in 'Python' started by Lo'oris, Nov 18, 2009.

  1. Lo'oris

    Lo'oris Guest

    I've found this email, back from 10 years ago:
    http://mail.python.org/pipermail/python-list/1999-September/009983.html

    I guess it went unnoticed, because that proposal looks really
    intresting.

    • break labels have been refused into python
    • we can do it anyway using exceptions
    • this is a proposal for something better, resembling "the exception
    way" and much more powerful and python-like than break labels
     
    Lo'oris, Nov 18, 2009
    #1
    1. Advertising

  2. Lo'oris

    Chris Rebert Guest

    On Wed, Nov 18, 2009 at 4:05 AM, Lo'oris <> wrote:
    > I've found this email, back from 10 years ago:
    > http://mail.python.org/pipermail/python-list/1999-September/009983.html
    >
    > I guess it went unnoticed, because that proposal looks really
    > intresting.
    >
    > • break labels have been refused into python
    > • we can do it anyway using exceptions
    > • this is a proposal for something better, resembling "the exception
    > way" and much more powerful and python-like than break labels


    You're gonna have to wait 18-24 months:
    http://www.python.org/dev/peps/pep-3003/

    Also, the python-ideas list might be a better forum for discussing
    this than the general-interest list:
    http://mail.python.org/mailman/listinfo/python-ideas

    Cheers,
    Chris
    --
    http://blog.rebertia.com
     
    Chris Rebert, Nov 18, 2009
    #2
    1. Advertising

  3. Lo'oris

    Terry Reedy Guest

    Chris Rebert wrote:
    > On Wed, Nov 18, 2009 at 4:05 AM, Lo'oris <> wrote:
    >> I've found this email, back from 10 years ago:
    >> http://mail.python.org/pipermail/python-list/1999-September/009983.html
    >>
    >> I guess it went unnoticed, because that proposal looks really
    >> intresting.


    I think it went unnoticed because it is not very good, once looked at.
    >>
    >> • break labels have been refused into python
    >> • we can do it anyway using exceptions


    So the proposal is not needed

    >> • this is a proposal for something better, resembling "the exception
    >> way" and much more powerful and python-like than break labels


    It amounts to duplicating raise x...exception x as break x....continue x
    in the name of aesthetics and supposed efficiency. There would be no new
    functionality nor any abbreviation of code. The semantics of
    break/continue as specific loop subcommands would be changed to 'use
    anyplace'. The OP gives as a reason the possibility of a typo creating a
    raise x ... except y mis-match. But a break x ... continue y mismatch is
    equally likely.

    Anyway, I think the example given would be better written with immediate
    assignment followed by simple break, rather than the proposed delayed
    assignment.

    The exception example as given would have to be rewritten to work in 3.x.

    > You're gonna have to wait 18-24 months:
    > http://www.python.org/dev/peps/pep-3003/
    >
    > Also, the python-ideas list might be a better forum for discussing
    > this than the general-interest list:
    > http://mail.python.org/mailman/listinfo/python-ideas


    This is a fine place to discuss it.

    Terry Jan Reedy
     
    Terry Reedy, Nov 18, 2009
    #3
  4. Lo'oris

    Lo'oris Guest

    On Nov 18, 7:13 pm, Terry Reedy <> wrote:
    > It amounts to duplicating raise x...exception x as break x....continue x
    > in the name of aesthetics and supposed efficiency. There would be no new
    > functionality nor any abbreviation of code. The semantics of


    there would be abbreviation: you wouldn't have to declare somewhere a
    dummy exception class.

    > anyplace'. The OP gives as a reason the possibility of a typo creating a
    > raise x ... except y mis-match. But a break x ... continue y mismatch is
    > equally likely.


    no: if you mismatch a label in this case, it should be treated as a
    syntax error, not as an
    unhandled exception which you might not notice.
     
    Lo'oris, Nov 19, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jacek Stepniewski

    How to break line in Label control

    Jacek Stepniewski, Dec 3, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    435
    mikeb
    Dec 4, 2003
  2. =?Utf-8?B?TWFyZHk=?=

    Insert a line break in a label control

    =?Utf-8?B?TWFyZHk=?=, Jul 30, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    8,163
    =?Utf-8?B?TWFyZHk=?=
    Jul 30, 2005
  3. pavan
    Replies:
    2
    Views:
    417
    Greg Young
    May 5, 2006
  4. Replies:
    12
    Views:
    967
  5. Knut Krueger
    Replies:
    8
    Views:
    277
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page