Re: Re/Unresolved bug?

Discussion in 'Python' started by Xavier, Jun 29, 2003.

  1. Xavier

    Xavier Guest

    Steven,

    Thanks for your reply. Here is the exact, waiting to be fixed code:
    http://sabu.net/routekill.py

    -- Xavier.
    oderint dum mutuant

    ----- Original Message -----
    From: "Steven Taschuk" <>
    To: <>
    Sent: Saturday, June 28, 2003 9:26 AM
    Subject: Re: Re/Unresolved bug?


    > Quoth Xavier:
    > [...]
    > > t:163: SyntaxWarning: name 'VERBOSE' is assigned to before global
    > > declaration
    > > def main():
    > > (no debugging symbols found)...(no debugging symbols found)...(no

    debugging
    > > symbols found)...
    > > Program received signal SIGSEGV, Segmentation fault.
    > > 0x0807f022 in PyErr_NormalizeException ()

    > [...in 2.2.3 it dies with no segfault by no exception message either...]
    >
    > Could you post a minimal example of code which provokes this
    > behaviour?
    >
    > Without seeing code, I speculate irresponsibly: the SyntaxWarning
    > is unrelated to the segfault; the segfault might be due to
    > PyErr_NormalizeException somehow being called when no exception
    > has been set. (The bug fix in Python/errors.c revision 2.77 (part
    > of 2.3b1, backported to 2.2.3 in revision 2.66.10.2) seems
    > relevant.)
    >
    > --
    > Steven Taschuk
    > "What I find most baffling about that song is that it was not a hit."
    > -- Tony Dylan Davis (CKUA)
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
     
    Xavier, Jun 29, 2003
    #1
    1. Advertising

  2. Xavier

    Terry Reedy Guest

    "Xavier" <> wrote in message
    news:...
    > Steven,
    >
    > Thanks for your reply. Here is the exact, waiting to be fixed code:
    > http://sabu.net/routekill.py


    Suggestion: Put one "global METHOD, TARGETFILE, SINGLEIP, <etc>"
    statement after "def main()" and remove all the others buried within
    if blocks within a for block within an outer if block (and any past
    where I read).

    Reason: variables within a function are unconditionally local or
    global within a particular function. They cannot be one thing here
    and the other elsewhere depending on which conditional statements are
    true. So the standard (and tested) place for a global statement is at
    the top of the function. There is no possible advantage to your
    unusual placement and the now obvious possible disadvantage that it
    confuses the compiler, even if technically legal.

    Terry J. Reedy
     
    Terry Reedy, Jun 29, 2003
    #2
    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. jozo
    Replies:
    1
    Views:
    2,230
    Ralf Hildebrandt
    May 16, 2004
  2. Andrew Mayo
    Replies:
    1
    Views:
    1,436
    Ryan Stewart
    Jan 31, 2005
  3. Steven Taschuk

    Re: Re/Unresolved bug?

    Steven Taschuk, Jun 28, 2003, in forum: Python
    Replies:
    0
    Views:
    710
    Steven Taschuk
    Jun 28, 2003
  4. Steven Taschuk

    Re: Re/Unresolved bug?

    Steven Taschuk, Jun 29, 2003, in forum: Python
    Replies:
    1
    Views:
    693
    John Machin
    Jun 30, 2003
  5. Xavier

    Re: Re/Unresolved bug?

    Xavier, Jun 30, 2003, in forum: Python
    Replies:
    0
    Views:
    664
    Xavier
    Jun 30, 2003
Loading...

Share This Page