main icon indicating copy to clipboard operation
main copied to clipboard

co_firstlineno return different result for Ironpython and Cpython2.5.

Open ironpythonbot opened this issue 10 years ago • 1 comments

co_firstlineno return different result for Ironpython and Cpython2.5.

detail Info pls watch Repro Snippet.

E:\IronPyTestFor2.5\ironpythonCompatableFor2.5\ironpythonCompatableFor2.5\25\L ib

ipy
IronPython console: IronPython 2.0A5 (2.0.11011.00) on .NET 2.0.50727.1318
Copyright (c) Microsoft Corporation. All rights reserved.

s256 = ";";.join([";\n";] * 256 + [";spam";])
co = compile(s256, 'fn', 'exec')
co.co_firstlineno
0

e:\IronPyTestFor2.5\ironpythonCompatableFor2.5\ironpythonCompatableFor2.5\25\L ib
python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32
Type ";help";, ";copyright";, ";credits"; or ";license"; for more information.
s256 = ";";.join([";\n";] * 256 + [";spam";])
co = compile(s256, 'fn', 'exec')
co.co_firstlineno
257

This affects test_inspect.py as well.

Work Item Details

Original CodePlex Issue: Issue 23789 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jul 27, 2009 at 11:52 PM Reported by: dfugate Updated on: Feb 22, 2013 at 2:12 AM Updated by: jdhardy Custom value: Reported internally at Microsoft. Test: test_compile.py CreatedDate: 10/22/2007 NewInternalID: 409587 OldInternalID: 314895 AreaPath: IronPython

Plaintext Attachments

CodePlex Issue #23789 Plain Text Attachments

ironpythonbot avatar Dec 09 '14 17:12 ironpythonbot

On 2011-02-12 02:21:59 UTC, rjnienaber commented:

Current behaviour in 2.6.2 and 2.7b2 on .NET 4.0.30319.1: python27 testcase-23789.py

257 ipy26 testcase-23789.py

0 ipy27 testcase-23789.py

1 ipy testcase-23789.py

1

ironpythonbot avatar Dec 09 '14 17:12 ironpythonbot