Bugs item #1087551, was opened at 2004-12-18 16:33
Message generated for change (Comment added) made by jlgijsbers
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1087551&group_id=5470

Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: sprasanna199 (sprasanna199)
Assigned to: Samuele Pedroni (pedronis)
Summary: inspect.py module

Initial Comment:
I tried to compile python 2.4 inspect.py module in
Jython but it throwed an exception. The line 749 in the
inspect.py module caused the exception which is

start = lineno - 1 - context//2

The code corresponding to it was also shown.

But when I modified that line to 

start = lineno - 1 - context/2

it worked.

Regards,
S.Prasanna

Code:

if context > 0:
        start = lineno - 1 - context//2
        try:
            lines, lnum = findsource(frame)
        except IOError:
            lines = index = None
        else:
            start = max(start, 1)
            start = min(start, len(lines) - context)
            lines = lines[start:start+context]
            index = lineno - 1 - start
    else:
        lines = index = None

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

>Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-12-20 14:07

Message:
Logged In: YES 
user_id=469548

This is not a bug in Python. The '//' operator was
introduced in Python 2.2, while Jython is still tracking
Python 2.1.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1087551&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to