[New-bugs-announce] [issue2011] compiler.parse("1; ") adds unexpected extra Discard(Const(None)) to parse tree

Andrew Dalke report at bugs.python.org
Tue Feb 5 01:46:41 CET 2008


New submission from Andrew Dalke:

Python 2.6a0 (trunk:60565M, Feb  4 2008, 01:21:28) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from compiler import parse
>>> parse("1;")
Module(None, Stmt([Discard(Const(1)), Discard(Const(None))]))

I did not expect the Discard(Const(None)).  Instead, I expected

Module(None, Stmt([Discard(Const(1))]))

----------
components: Library (Lib)
messages: 62057
nosy: dalke
severity: minor
status: open
title: compiler.parse("1;") adds unexpected extra Discard(Const(None)) to parse tree
type: behavior
versions: Python 2.6

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2011>
__________________________________


More information about the New-bugs-announce mailing list