[Python-bugs-list] [ python-Bugs-409587 ] Tools/compiler loses linenos

noreply@sourceforge.net noreply@sourceforge.net
Wed, 11 Apr 2001 09:37:54 -0700


Bugs item #409587, was updated on 2001-03-18 13:05
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=409587&group_id=5470

Category: demos and tools
Group: None
>Status: Closed
Priority: 5
Submitted By: Paul Prescod (prescod)
Assigned to: Jeremy Hylton (jhylton)
Summary: Tools/compiler loses linenos

Initial Comment:
You can see the problem with this simple program:

def foo():
    pass

1/0

Standard Python compiler:

>python -c "import test"
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "test.py", line 4, in ?
    1/0
ZeroDivisionError: integer division or modulo

>del test.pyc

Tools/compile.py : 

>python compile.py test.py

>python -c "import test"
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "test.py", line 1, in <module>
    def foo():
ZeroDivisionError: integer division or modulo


----------------------------------------------------------------------

>Comment By: Jeremy Hylton (jhylton)
Date: 2001-04-11 09:37

Message:
Logged In: YES 
user_id=31392

Fix in rev 1.30 of pycodegen.py and rev 1.21 of
transformer.py


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=409587&group_id=5470