Title: ASTList behavior
Type: behaviour Severity: normal
Components: Core Versions: 2.5b1
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: MrMeanie, fwierzbicki
Priority: high Keywords: patch

Created on 2009-03-14.14:53:40 by MrMeanie, last changed 2009-03-17.19:01:01 by fwierzbicki.

File name Uploaded Description Edit Remove MrMeanie, 2009-03-14.14:55:42 Unit test Python source
Issue1272_astlist_v1_20090314.patch MrMeanie, 2009-03-14.14:57:12 Patch to latest SVN
msg4294 (view) Author: Geoffrey French (MrMeanie) Date: 2009-03-14.14:53:39
Accessing items from a slice taken from a AST list can cause a
ClassCastException in the Jython interpreter.

For exmaple:

expr = compile( 'a < b < c', '<module>', 'eval', _ast.PyCF_ONLY_AST )
compare = expr.body
a = compare.ops[1:][0]

will throw a ClassCastException
msg4295 (view) Author: Geoffrey French (MrMeanie) Date: 2009-03-14.14:55:42
Please find attached a unit test for this issue.
msg4297 (view) Author: Geoffrey French (MrMeanie) Date: 2009-03-14.14:57:12
Please find attached a patch to fix this issue.
msg4305 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-03-17.19:01:00
applied to r6099 on trunk, thanks!
Date User Action Args
2009-03-17 19:01:01fwierzbickisetstatus: open -> closed
resolution: fixed
messages: + msg4305
2009-03-14 15:05:47fwierzbickisetpriority: high
assignee: fwierzbicki
nosy: + fwierzbicki
2009-03-14 14:57:13MrMeaniesetfiles: + Issue1272_astlist_v1_20090314.patch
keywords: + patch
messages: + msg4297
2009-03-14 14:55:42MrMeaniesetfiles: +
messages: + msg4295
2009-03-14 14:53:40MrMeaniecreate