[issue1810] Partial AST compile() patch

2008-01-12 Thread Georg Brandl
Georg Brandl added the comment: This is great work! The problem is that ast2obj_object translates NULL values to Py_None, but obj2ast_object doesn't translate that back. This definition fixes your testcase: static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena) { if (obj =

[issue1810] Partial AST compile() patch

2008-01-11 Thread Christian Heimes
Christian Heimes added the comment: Georg is working on the AST front. -- assignee: -> georg.brandl keywords: +patch nosy: +georg.brandl, tiran priority: -> normal __ Tracker <[EMAIL PROTECTED]> ___

[issue1810] Partial AST compile() patch

2008-01-11 Thread Thomas Lee
Thomas Lee added the comment: Attaching a sample program to demonstrate the crash. Added file: http://bugs.python.org/file9135/ast.py __ Tracker <[EMAIL PROTECTED]> __

[issue1810] Partial AST compile() patch

2008-01-11 Thread Thomas Lee
New submission from Thomas Lee: This patch against HEAD provides the inverse operations to all the ast2obj_* functions in Python/Python-ast.c: effectively, this allows conversion to & from a PyObject representation of a Python AST. Additionally, it updates the compile() builtin to allow it to co