[issue28100] Refactor error messages in symtable.c

2016-10-07 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28100] Refactor error messages in symtable.c

2016-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 966b57281536 by Christian Heimes in branch '3.6': Issue #28100: Refactor error messages, patch by Ivan Levkivskyi https://hg.python.org/cpython/rev/966b57281536 New changeset a953112116ac by Christian Heimes in branch 'default': Issue #28100:

[issue28100] Refactor error messages in symtable.c

2016-09-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Here is the patch for 3.6 with requested changes. While playing with this a bit more, I discovered that the error message in this case (if no value is actually assigned): def f(): x: int global x could be misleading. Therefore I changed the order of

[issue28100] Refactor error messages in symtable.c

2016-09-21 Thread Christian Heimes
Christian Heimes added the comment: Please rewrite the patch to use if / else if / else, e.g. if (cur & (DEF_LOCAL | USE | DEF_ANNOT)) { ... if (cur & USE) { msg = GLOBAL_AFTER_USE; } else if (cur & DEF_LOCAL) { msg = GLOBAL_AFTER_ASSIGN; } else { /* DEF_ANNOT

[issue28100] Refactor error messages in symtable.c

2016-09-12 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi: Patch with added comment and a minor refactoring to error messages in symtable.c Now the error message is simply always overwritten by any more "severe" SyntaxError found in the same block. -- components: Interpreter Core files: