This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nnorwitz
Recipients
Date 2006-12-20.08:38:13
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
When regenerating the patch, can you also remove non-functional changes such as removing unneeded parens and whitespace changes.  Also, please try to keep the same formatting in the file wrt tabs and spaces and don't move code around.  I know this is a pain and inconsistent.  I think I changed ast.c to be all 4 space indents with spaces only.

In compiler_simple_arg(), don't you need to check if annotation is NULL when returned from ast_for_expr?  Otherwise an undetected error would go through, wouldn't it?

In compiler_complex_args(), don't you need to set the ast_error (or a SystemError) if the switch isn't a tname, vname, or LPAR?  I don't like the names tname and vname.  Also they seem inconsistent.  Aren't all the other names all CAPS?

In hunk, @@ -602,51 +625,75 @@ remove the commented out code.  We shouldn't use any // style comments either.
Can you improve the error msg for kwdefaults == NULL?  (Thanks for adding it!)
Check annotation for NULL if returned from ast_for_expr?

BTW, the AST code in this area was tricky code which had some bugs.  Did you test with adding extra parentheses and singleton tuples?

I'm not sure if Guido preferred syntax -> vs a keyword 'as' for the return type.

In symtable.c remove the printfs.  They should probably be SystemErrors or something.

I would definitely prefer the annotations baked into the code object so there are no changes to ceval.

Did we decide if lambda was going to require parens around the arguments?  If so, it could support annotations, right?  (No comment on the usefulness of annotations for lambdas. :-)

In compiler_visit_argannotation, you should return the result from PyList_Append and can remove the comment about checking for errors.  Also, I believe the INCREF is not needed, it will be done by PyList_Append.
Same deal with returning result of compiler_visit_argannotations() (the one with an s).

Need to check for PyList_New() returning NULL in compiler_visit_annotations().
Lots more error checking needs to be added in this area.

Dammit, I really want to use Mondrian for these comments!  (Sorry Tony, not your fault, I'm just having some bad memories at this point cause I have to keep providing the references.)

This patch looks very complete in that it updates things like the compiler package and the parsermodule.c.  Good job!  This is a great start.
History
Date User Action Args
2007-08-23 15:55:32adminlinkissue1607548 messages
2007-08-23 15:55:32admincreate